@arcgis/core 5.1.0-next.127 → 5.1.0-next.128
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/Urban/editingSessionUtils.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerParquet.js +2 -0
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade.d.ts +2 -1
- package/arcgisGlobal.d.ts +3 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +1 -0
- package/assets/esri/core/workers/chunks/{b045bffb4f2eb9203183.js → 05e1f1628a3726eca03d.js} +1 -1
- package/assets/esri/core/workers/chunks/{38cfedce779dd75bd217.js → 07ca020796c57cefda62.js} +1 -1
- package/assets/esri/core/workers/chunks/08dfe61c75f0032db4d4.js +1 -0
- package/assets/esri/core/workers/chunks/0a1037fdc8c7bf8d0e7e.js +1 -0
- package/assets/esri/core/workers/chunks/0b45d34938fa7862f746.js +1 -0
- package/assets/esri/core/workers/chunks/0fe57b2d06368d3f68c9.js +1 -0
- package/assets/esri/core/workers/chunks/11c3b1e8ca21ad62fdd1.js +1 -0
- package/assets/esri/core/workers/chunks/{1436e378d975345686aa.js → 183b7664c68babd90fc8.js} +1 -1
- package/assets/esri/core/workers/chunks/{c187bc997bad61b6c6e9.js → 18d1ac2165a84c42e98f.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b169bb1969f86232a1a.js → 1b03e10a6b721365acbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7e363c14919698f5b65.js → 1b07d7656ffcf53cba2b.js} +1 -1
- package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +1 -0
- package/assets/esri/core/workers/chunks/1d38b2fcd85ac9ebd7c6.js +1 -0
- package/assets/esri/core/workers/chunks/1d91e69483c3ceec3c4d.js +1 -0
- package/assets/esri/core/workers/chunks/{c2cd80b712f29e8cbb8d.js → 1ff57bf19f021f5fd246.js} +1 -1
- package/assets/esri/core/workers/chunks/{287f1441819c345f389e.js → 268243ee64d001009f78.js} +1 -1
- package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
- package/assets/esri/core/workers/chunks/2b781de7b467c61849b2.js +1 -0
- package/assets/esri/core/workers/chunks/309fcc46da0b4393960e.js +1 -0
- package/assets/esri/core/workers/chunks/{03e93c18efc67a25ca63.js → 35c4037b8eea067d9638.js} +1 -1
- package/assets/esri/core/workers/chunks/39a10b2092a98083f4cf.js +1 -0
- package/assets/esri/core/workers/chunks/3b9174de370b187a0985.js +1 -0
- package/assets/esri/core/workers/chunks/3bd32387af52fa48d747.js +1 -0
- package/assets/esri/core/workers/chunks/3d4bb539bf939fcdeef9.js +1 -0
- package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +1 -0
- package/assets/esri/core/workers/chunks/42e5e00610f281ca8ffa.js +1 -0
- package/assets/esri/core/workers/chunks/{73c355b895fd6a34fcb8.js → 45b560ca01fb566ba560.js} +1 -1
- package/assets/esri/core/workers/chunks/{d36b407f5ad5eabac530.js → 4a9e34fe9a16b1850876.js} +28 -28
- package/assets/esri/core/workers/chunks/4e59e5a5d0ff887ff899.js +1 -0
- package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +1 -0
- package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +1 -0
- package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
- package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
- package/assets/esri/core/workers/chunks/{640abe600fa069ed7640.js → 6144f59bc0ba153a82d3.js} +1 -1
- package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +1 -0
- package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +1 -0
- package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +1 -0
- package/assets/esri/core/workers/chunks/67bf361d0b5cfd6b53da.js +1 -0
- package/assets/esri/core/workers/chunks/68b77b36daae2b4b4237.js +1 -0
- package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +1 -0
- package/assets/esri/core/workers/chunks/70b5e0fce22122a7ccc2.js +1 -0
- package/assets/esri/core/workers/chunks/73b0edabddbb72fe1104.js +1 -0
- package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → 75b4c27ca02b124a713c.js} +1 -1
- package/assets/esri/core/workers/chunks/7a1f65511bce26e6b770.js +1 -0
- package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +1 -0
- package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
- package/assets/esri/core/workers/chunks/8570d1c7159b5a84d56c.js +1 -0
- package/assets/esri/core/workers/chunks/{3bdef4b9f86711ae48b3.js → 86cad656a6a473982109.js} +2 -2
- package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
- package/assets/esri/core/workers/chunks/{5cb1b950249d651f3837.js → 8dcb3e77f76d8396706b.js} +1 -1
- package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +1 -0
- package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +1 -0
- package/assets/esri/core/workers/chunks/96f58e0157b960f6ee22.js +1 -0
- package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 993fee0e91303eb1f01f.js} +1 -1
- package/assets/esri/core/workers/chunks/9da1a514e042eb642d35.js +1 -0
- package/assets/esri/core/workers/chunks/9f93c29af2a18f7cb160.js +1 -0
- package/assets/esri/core/workers/chunks/{f0556a695d080454b8da.js → 9fd61a387bd6603da299.js} +1 -1
- package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +1 -0
- package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
- package/assets/esri/core/workers/chunks/a4cdcb0b06242a95722a.js +1 -0
- package/assets/esri/core/workers/chunks/{bfd1aef8ac795e1ce227.js → a892b3be70f482bef0ba.js} +1 -1
- package/assets/esri/core/workers/chunks/a8ef7acb6d3d1f45e14c.js +1 -0
- package/assets/esri/core/workers/chunks/ac5032253c752768021b.js +2 -0
- package/assets/esri/core/workers/chunks/ac7ecd90330090c90005.js +1 -0
- package/assets/esri/core/workers/chunks/b1524f23e6cee5301a14.js +1 -0
- package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
- package/assets/esri/core/workers/chunks/b75a4753cea6544da8bb.js +1 -0
- package/assets/esri/core/workers/chunks/b775a0d8894930af4983.js +1 -0
- package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
- package/assets/esri/core/workers/chunks/bd36c57dd0cd28dee55f.js +30 -0
- package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
- package/assets/esri/core/workers/chunks/be8340d5ae5e662c2671.js +1 -0
- package/assets/esri/core/workers/chunks/{97a654e8054302582a3b.js → bfa6f4c08e7571bb1f37.js} +1 -1
- package/assets/esri/core/workers/chunks/c030cdb4cdb08cb51501.js +262 -0
- package/assets/esri/core/workers/chunks/c2cbc2a920e6e199533a.js +1 -0
- package/assets/esri/core/workers/chunks/c8460bdf60aca749ed05.js +30 -0
- package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +1 -0
- package/assets/esri/core/workers/chunks/cf9a132c4c37e62de3d7.js +1 -0
- package/assets/esri/core/workers/chunks/{03354e9256b2f77fd4f2.js → d6145cd7e7c5346f62ec.js} +1 -1
- package/assets/esri/core/workers/chunks/d6911e9453532501f460.js +1 -0
- package/assets/esri/core/workers/chunks/{886ae23a1d8fa21e531f.js → d750e4abeb777caa8c36.js} +1 -1
- package/assets/esri/core/workers/chunks/dada22a4350e9ddaf850.js +30 -0
- package/assets/esri/core/workers/chunks/e9acc05b0cf9e05f31a8.js +1 -0
- package/assets/esri/core/workers/chunks/e9cd84ad0054e9fea448.js +1 -0
- package/assets/esri/core/workers/chunks/ead719bff4a94816a42e.js +1 -0
- package/assets/esri/core/workers/chunks/f116ff0121d28bbf7a23.js +1 -0
- package/assets/esri/core/workers/chunks/f27c7d5cb0937fe50acf.js +1 -0
- package/assets/esri/core/workers/chunks/f5f9f21c23c51e35ae65.js +1 -0
- package/assets/esri/core/workers/chunks/f955b35337a08f9f747d.js +1 -0
- package/assets/esri/core/workers/chunks/{f75295cdd5e84eb97d5a.js → f9d583785b3b09ace222.js} +1 -1
- package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
- package/chunks/ComponentShader.glsl.js +11 -11
- package/chunks/GaussianSplatComposition.glsl.js +1 -1
- package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
- package/chunks/OITBlend.glsl.js +1 -24
- package/chunks/OITBlendEmission.glsl.js +9 -9
- package/chunks/OITDimOpaque.glsl.js +3 -9
- package/config.js +1 -1
- package/core/reactiveUtils.d.ts +410 -109
- package/graphic/AnnotationFeatureGraphicOrigin.d.ts +5 -2
- package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
- package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
- package/graphic/graphicOrigins.js +1 -1
- package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
- package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
- package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
- package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
- package/interfaces.d.ts +3 -3
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +73 -0
- package/layers/AnnotationFeatureLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/support/{AnnotationSublayer.d.ts → AnnotationFeatureSublayer.d.ts} +12 -12
- package/layers/support/AnnotationFeatureSublayer.js +2 -0
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/ParquetPortalItemData.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +3 -3
- package/rest/print.js +1 -1
- package/smartMapping/renderers/location.js +1 -1
- package/smartMapping/renderers/predominance.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
- package/smartMapping/renderers/support/rendererUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/webStyleSymbolCache.js +2 -0
- package/undoredo/support/ApplySet.js +1 -1
- package/undoredo/support/ApplySetItem.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +2 -0
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/View2D.d.ts +2 -3
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/webscene/support/AlphaCutoff.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -2
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +30 -4
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Print/PrintViewModel.d.ts +11 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0803f022b5191171bc9c.js +0 -1
- package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +0 -1
- package/assets/esri/core/workers/chunks/19dcae83be0fc0aced02.js +0 -1
- package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +0 -1
- package/assets/esri/core/workers/chunks/23d50c4478f40a7d62bf.js +0 -1
- package/assets/esri/core/workers/chunks/2623cd08487fdc9a94f1.js +0 -1
- package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +0 -1
- package/assets/esri/core/workers/chunks/2b814bb51704a5b4fdc2.js +0 -30
- package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +0 -1
- package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +0 -1
- package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +0 -30
- package/assets/esri/core/workers/chunks/426b8e1e2eef2460851d.js +0 -1
- package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +0 -1
- package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +0 -1
- package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +0 -1
- package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +0 -1
- package/assets/esri/core/workers/chunks/59a60fa09b19a0b2f473.js +0 -1
- package/assets/esri/core/workers/chunks/59dafa1e1340ea4043e6.js +0 -1
- package/assets/esri/core/workers/chunks/6284eafe2c3b45a0e72a.js +0 -1
- package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
- package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
- package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +0 -1
- package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
- package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +0 -1
- package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +0 -1
- package/assets/esri/core/workers/chunks/6f7193b9ff5942c0d354.js +0 -1
- package/assets/esri/core/workers/chunks/70737052bab29fcaa120.js +0 -1
- package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +0 -1
- package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
- package/assets/esri/core/workers/chunks/8486ef6c7076baf0348b.js +0 -1
- package/assets/esri/core/workers/chunks/851705cf276eae8d4d37.js +0 -1
- package/assets/esri/core/workers/chunks/882ee7ed8a3a0215f9b9.js +0 -1
- package/assets/esri/core/workers/chunks/8c443c52c846a096a250.js +0 -1
- package/assets/esri/core/workers/chunks/972ba277a27704d28357.js +0 -1
- package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +0 -1
- package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
- package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +0 -1
- package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +0 -1
- package/assets/esri/core/workers/chunks/a2d7e8147dee6642029a.js +0 -2
- package/assets/esri/core/workers/chunks/a643a4751bbf4430bde2.js +0 -262
- package/assets/esri/core/workers/chunks/a9003fe5975cd554ba24.js +0 -1
- package/assets/esri/core/workers/chunks/aa02458ceb839b555ee1.js +0 -1
- package/assets/esri/core/workers/chunks/ab62724b80b3c478a597.js +0 -1
- package/assets/esri/core/workers/chunks/b44cf254585210578eab.js +0 -1
- package/assets/esri/core/workers/chunks/b9935cc8e2bd4045058a.js +0 -1
- package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +0 -1
- package/assets/esri/core/workers/chunks/c32430e99e8cd6e5f688.js +0 -1
- package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
- package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
- package/assets/esri/core/workers/chunks/ca8c08659d82019d775d.js +0 -1
- package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +0 -1
- package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
- package/assets/esri/core/workers/chunks/d52864823067e57a719a.js +0 -1
- package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +0 -1
- package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
- package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +0 -1
- package/assets/esri/core/workers/chunks/e1505ec80b068011bdc5.js +0 -1
- package/assets/esri/core/workers/chunks/e16710ef178d64606a55.js +0 -1
- package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +0 -1
- package/assets/esri/core/workers/chunks/e5ef06c205d34df1e4bc.js +0 -1
- package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +0 -1
- package/assets/esri/core/workers/chunks/eabeaab5c4810f999a4d.js +0 -1
- package/assets/esri/core/workers/chunks/ec723f8777b935c5e81a.js +0 -1
- package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +0 -1
- package/assets/esri/core/workers/chunks/f622ae3887c85535e8ab.js +0 -30
- package/assets/esri/core/workers/chunks/fa3faec65882c5b6f1a0.js +0 -1
- package/layers/support/AnnotationSublayer.js +0 -2
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechniqueConfiguration.js +0 -2
- /package/assets/esri/core/workers/chunks/{3bdef4b9f86711ae48b3.js.LICENSE.txt → 86cad656a6a473982109.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a2d7e8147dee6642029a.js.LICENSE.txt → ac5032253c752768021b.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{fetchFullFeaturesByObjectId as i,updateGraphicSymbolWhenRequired as s,swapForEditingSession as t}from"../../views/draw/support/editingSessionUtils.js";async function n(n){const{graphicsLayer:a,graphic:c,signal:p,view:
|
|
2
|
+
import e from"../../core/Error.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{fetchFullFeaturesByObjectId as i,updateGraphicSymbolWhenRequired as s,swapForEditingSession as t}from"../../views/draw/support/editingSessionUtils.js";async function n(n){const{graphicsLayer:a,graphic:c,signal:p,view:u}=n,d=c.sourceLayer;if(!r(d))throw new e("editing-session:unsupported-layer","The graphic source layer does not support editing sessions.");const l=c.getObjectId();if(null==l)throw new e("editing-session:missing-object-id","The graphic does not have an object id and cannot be used for an editing session.");const g=await i([l],d,u.spatialReference,p);if(o(n),1!==g.length)throw new e("editing-session:feature-not-found","Unable to resolve exactly one feature for the provided graphic.");const f=g[0],h="2d"===u.type?u.scale:null;await s(f,h,p),o(n);const w=await t(a,u,c,f,p),y=()=>w.remove();return{graphic:f,remove:y,[Symbol.asyncDispose]:y}}function r(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatures"in e}export{n as openEditingSession};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../request.js";import t from"./featureSetCollection.js";import{m as a,a4 as r}from"../chunks/languageUtils.js";import n from"./featureset/actions/AttributeFilter.js";import l from"./featureset/sources/FeatureLayerDynamic.js";import s from"./featureset/sources/FeatureLayerMemory.js";import i from"./featureset/sources/FeatureLayerRelated.js";import o from"./featureset/support/cache.js";import{FeatureSetError as u}from"./featureset/support/errorsupport.js";import{isSupportedLayer as c,extractServiceUrl as d}from"./featureset/support/shared.js";import{isLoadable as p}from"../core/Loadable.js";import f from"../core/sql/WhereClause.js";import y from"../layers/FeatureLayer.js";import m from"../layers/Layer.js";import h from"../portal/PortalItem.js";function w(){null===o.applicationCache&&(o.applicationCache=new o)}async function I(e,t,a){if(o.applicationCache){const a=o.applicationCache.getLayerInfo(e);if(a){const r=await a;return new y({url:e,outFields:t,sourceJSON:r})}const n=new y({url:e,outFields:t}),l=(async()=>(await n.load(),n.sourceJSON))();if(o.applicationCache){o.applicationCache.setLayerInfo(e,l);try{return await l,n}catch(r){throw o.applicationCache.clearLayerInfo(e),r}}return await l,n}if(null!=a){const r=a.getCachedLayerMetadata(e);if(r){const a=await r;return new y({url:e,outFields:t,sourceJSON:a})}const l=new y({url:e,outFields:t}),s=(async()=>(await l.load(),l.sourceJSON))();a.setCachedLayerMetadata(e,s);try{return await s,l}catch(n){throw a.removeCachedLayerMetadata(e,s),n}}return new y({url:e,outFields:t})}async function L(e,t,a,r,n,l=null){return _(await I(e,["*"],n),t,a,r,n,l)}function _(e,t=null,a=null,r=!0,i=null,o=null){switch(e.type){case"catalog-footprint":return _(e.parent,t,a,r,i,o);case"subtype-sublayer":{const l=_(e.parent,t,a,r,i,o);return new n({parentfeatureset:l,whereclause:f.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new s({layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:i,interceptor:o});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:i,interceptor:o};return!e.url&&e.source?new s(n):new l(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function S(t){if(null!==o.applicationCache){const e=o.applicationCache.getLayerInfo(t);if(null!==e)return e}const a=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"}});return a.data?a.data:null})();if(null!==o.applicationCache){o.applicationCache.setLayerInfo(t,a);try{return await a}catch(r){throw o.applicationCache.clearLayerInfo(t),r}}return a}async function C(t,a){const r="QUERYDATAELEMTS:"+a.toString()+":"+t;if(null!==o.applicationCache){const e=o.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await e(t+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([a.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new u("DataElementsNotFound")})();if(null!==o.applicationCache){o.applicationCache.setLayerInfo(r,n);try{return await n}catch(l){throw o.applicationCache.clearLayerInfo(r),l}}return n}async function k(t,a){if(null!==o.applicationCache){const e=o.applicationCache.getLayerInfo(t);if(null!==e)return e}if(null!=a){const e=a.getCachedServiceMetadata(t);if(null!=e)return e}const r=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(a.data){const e=a.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==o.applicationCache){o.applicationCache.setLayerInfo(t,r);try{return await r}catch(n){throw o.applicationCache.clearLayerInfo(t),n}}if(null!=a){a.setCachedServiceMetadata(t,r);try{return await r}catch(l){throw a.removeCachedServiceMetadata(t,r),l}}return r}async function g(e,t,a){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},l=await k(e,null);if(r.metadata=l,void 0!==l.controllerDatasetLayers?.utilityNetworkLayerId&&null!==l.controllerDatasetLayers.utilityNetworkLayerId){if(l.layers)for(const e of l.layers)r.layerNameLkp[e.id]=e.name;if(l.tables)for(const e of l.tables)r.layerNameLkp[e.id]=e.name;const s=l.controllerDatasetLayers.utilityNetworkLayerId;r.networkId=s;const i=await C(e,s);if(i){r.queryelem=i,r.queryelem?.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const l=await S(e+"/"+s);if(void 0!==l.systemLayers?.associationsTableId&&null!==l.systemLayers.associationsTableId){let s=null;if(a&&r.unVersion<8){const a=[];r.unVersion>=4&&(a.push("STATUS"),a.push("PERCENTALONG")),s=await L(e+"/"+l.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...a],!1,null,null),await s.load(),r.unVersion>=4&&(s=new n({parentfeatureset:s,whereclause:f.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC})}),await s.load())}return{lkp:r.lkp,associations:s,unVersion:r.unVersion,terminals:r.terminals,layerIdLookup:r.layerIdLookup,sourceIdLookup:r.sourceIdLookup}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function F(e,t,a,r=null,n=null,l=!0,s=null,o=null){let u=e.serviceUrl();if(!u)return null;u=u.endsWith("/")?u+t.relatedTableId.toString():u+"/"+t.relatedTableId.toString();const c=await L(u,r,n,l,s,o);return new i({layer:e,relatedLayer:c,relationship:t,objectId:a,spatialReference:r,outFields:n,includeGeometry:l,lrucache:s,interceptor:o})}class N extends t{constructor(e,t=null,a=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,a=null){const r=_(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async listAll(){p(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>c(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>c(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,a=null){if(p(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>c(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>c(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){if(p(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>c(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>c(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}}class T extends t{constructor(e,t=null,a=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,a=null){const r=_(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async _loadMetaData(){const e=await k(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new T(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,a=null){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])s.name===e&&(l=s);if(!l)for(const s of n.tables??[])s.name===e&&(l=s);if(l){const e=await I(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);e=null!=e?e.toString():"";for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(!l)for(const s of n.tables??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(l){const e=await I(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}}function A(e,t,a=null,r=null){return new N(e,t,a,r)}function O(e,t,a=null,r=null){return new T(e,t,a,r)}function E(e,t,n,l,s){if(null===e)return null;if(a(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof m&&c(e)){switch(t){case"datasource":return _(e,s,"outFields"in e?e.outFields:null,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return _(e,s,"outFields"in e?e.outFields:null,!0,n,l)}return null}if(r(e)){switch(t){case"datasource":return _(e.parent,s,e.parent.outFields,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return _(e,s,e.parent.outFields,!0,n,l)}return null}return null}async function M(e,t,a,r,n,l,s,i=null){if(o.applicationCache){const u=o.applicationCache.getLayerInfo(e+":"+l.url);if(u)return b(await u,t,a,r,n,s,i)}if(null!=s){const o=s.getCachedPortalItem(l.url,e);if(null!=o)return await b(await o,t,a,r,n,s,i)}const u=new h({id:e,portal:l}).load();o.applicationCache?o.applicationCache.setLayerInfo(e+":"+l.url,u):null!=s&&s.setCachedPortalItem(l.url,e,u);try{return await b(await u,t,a,r,n,s,i)}catch(c){throw o.applicationCache&&o.applicationCache.clearLayerInfo(e+":"+l.url),null!=s&&s.removeCachedPortalItem(l.url,e,u),c}}async function b(e,t,a,r,n,l,s){let i;if("Feature Service"===e.type||"Map Service"===e.type)i=await I(d(e.url??"")+"/"+t,["*"],l);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=l){const t=l.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)i=await t;else{const t=m.fromPortalItem(e);l.setCachedPortalItemLayer(e.portal.url,e.id,t);try{i=await t}catch(o){throw l.removeCachedPortalItemLayer(e.portal.url,e.id,t),o}}}else i=await m.fromPortalItem(e)}return _(i,a,r,n,l,s)}export{g as constructAssociationMetaDataFeatureSetFromUrl,_ as constructFeatureSet,M as constructFeatureSetFromPortalItem,F as constructFeatureSetFromRelationship,L as constructFeatureSetFromUrl,E as convertToFeatureSet,A as createFeatureSetCollectionFromMap,O as createFeatureSetCollectionFromService,w as initialiseMetaDataCache};
|
|
2
|
+
import e from"../request.js";import t from"./featureSetCollection.js";import{m as a,a4 as r}from"../chunks/languageUtils.js";import n from"./featureset/actions/AttributeFilter.js";import l from"./featureset/sources/FeatureLayerDynamic.js";import s from"./featureset/sources/FeatureLayerMemory.js";import i from"./featureset/sources/FeatureLayerParquet.js";import o from"./featureset/sources/FeatureLayerRelated.js";import u from"./featureset/support/cache.js";import{FeatureSetError as c}from"./featureset/support/errorsupport.js";import{isSupportedLayer as d,extractServiceUrl as p}from"./featureset/support/shared.js";import{isLoadable as y}from"../core/Loadable.js";import f from"../core/sql/WhereClause.js";import m from"../layers/FeatureLayer.js";import h from"../layers/Layer.js";import w from"../layers/ParquetLayer.js";import I from"../layers/support/ParquetPortalItemData.js";import L from"../portal/PortalItem.js";function _(){null===u.applicationCache&&(u.applicationCache=new u)}async function S(e,t,a){if(u.applicationCache){const a=u.applicationCache.getLayerInfo(e);if(a){const r=await a;return new m({url:e,outFields:t,sourceJSON:r})}const n=new m({url:e,outFields:t}),l=(async()=>(await n.load(),n.sourceJSON))();if(u.applicationCache){u.applicationCache.setLayerInfo(e,l);try{return await l,n}catch(r){throw u.applicationCache.clearLayerInfo(e),r}}return await l,n}if(null!=a){const r=a.getCachedLayerMetadata(e);if(r){const a=await r;return new m({url:e,outFields:t,sourceJSON:a})}const l=new m({url:e,outFields:t}),s=(async()=>(await l.load(),l.sourceJSON))();a.setCachedLayerMetadata(e,s);try{return await s,l}catch(n){throw a.removeCachedLayerMetadata(e,s),n}}return new m({url:e,outFields:t})}async function C(e,t,a,r,n,l=null){return F(await S(e,["*"],n),t,a,r,n,l)}function F(e,t=null,a=null,r=!0,o=null,u=null){switch(e.type){case"catalog-footprint":return F(e.parent,t,a,r,o,u);case"subtype-sublayer":{const l=F(e.parent,t,a,r,o,u);return new n({parentfeatureset:l,whereclause:f.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new s({layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:o,interceptor:u});case"parquet":return new i({layer:e,spatialReference:t,outFields:a,includeGeometry:r});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:o,interceptor:u};return!e.url&&e.source?new s(n):new l(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function k(t){if(null!==u.applicationCache){const e=u.applicationCache.getLayerInfo(t);if(null!==e)return e}const a=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"}});return a.data?a.data:null})();if(null!==u.applicationCache){u.applicationCache.setLayerInfo(t,a);try{return await a}catch(r){throw u.applicationCache.clearLayerInfo(t),r}}return a}async function g(t,a){const r="QUERYDATAELEMTS:"+a.toString()+":"+t;if(null!==u.applicationCache){const e=u.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await e(t+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([a.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new c("DataElementsNotFound")})();if(null!==u.applicationCache){u.applicationCache.setLayerInfo(r,n);try{return await n}catch(l){throw u.applicationCache.clearLayerInfo(r),l}}return n}async function N(t,a){if(null!==u.applicationCache){const e=u.applicationCache.getLayerInfo(t);if(null!==e)return e}if(null!=a){const e=a.getCachedServiceMetadata(t);if(null!=e)return e}const r=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(a.data){const e=a.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==u.applicationCache){u.applicationCache.setLayerInfo(t,r);try{return await r}catch(n){throw u.applicationCache.clearLayerInfo(t),n}}if(null!=a){a.setCachedServiceMetadata(t,r);try{return await r}catch(l){throw a.removeCachedServiceMetadata(t,r),l}}return r}async function T(e,t,a){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},l=await N(e,null);if(r.metadata=l,void 0!==l.controllerDatasetLayers?.utilityNetworkLayerId&&null!==l.controllerDatasetLayers.utilityNetworkLayerId){if(l.layers)for(const e of l.layers)r.layerNameLkp[e.id]=e.name;if(l.tables)for(const e of l.tables)r.layerNameLkp[e.id]=e.name;const s=l.controllerDatasetLayers.utilityNetworkLayerId;r.networkId=s;const i=await g(e,s);if(i){r.queryelem=i,r.queryelem?.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const l=await k(e+"/"+s);if(void 0!==l.systemLayers?.associationsTableId&&null!==l.systemLayers.associationsTableId){let s=null;if(a&&r.unVersion<8){const a=[];r.unVersion>=4&&(a.push("STATUS"),a.push("PERCENTALONG")),s=await C(e+"/"+l.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...a],!1,null,null),await s.load(),r.unVersion>=4&&(s=new n({parentfeatureset:s,whereclause:f.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC})}),await s.load())}return{lkp:r.lkp,associations:s,unVersion:r.unVersion,terminals:r.terminals,layerIdLookup:r.layerIdLookup,sourceIdLookup:r.sourceIdLookup}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function A(e,t,a,r=null,n=null,l=!0,s=null,i=null){let u=e.serviceUrl();if(!u)return null;u=u.endsWith("/")?u+t.relatedTableId.toString():u+"/"+t.relatedTableId.toString();const c=await C(u,r,n,l,s,i);return new o({layer:e,relatedLayer:c,relationship:t,objectId:a,spatialReference:r,outFields:n,includeGeometry:l,lrucache:s,interceptor:i})}class O extends t{constructor(e,t=null,a=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,a=null){const r=F(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async listAll(){y(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>d(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>d(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,a=null){if(y(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>d(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>d(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){if(y(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>d(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>d(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}}class E extends t{constructor(e,t=null,a=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,a=null){const r=F(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async _loadMetaData(){const e=await N(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new E(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,a=null){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])s.name===e&&(l=s);if(!l)for(const s of n.tables??[])s.name===e&&(l=s);if(l){const e=await S(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);e=null!=e?e.toString():"";for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(!l)for(const s of n.tables??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(l){const e=await S(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}}function D(e,t,a=null,r=null){return new O(e,t,a,r)}function M(e,t,a=null,r=null){return new E(e,t,a,r)}function b(e,t,n,l,s){if(null===e)return null;if(a(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof h&&d(e)){switch(t){case"datasource":return F(e,s,"outFields"in e?e.outFields:null,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return F(e,s,"outFields"in e?e.outFields:null,!0,n,l)}return null}if(r(e)){switch(t){case"datasource":return F(e.parent,s,e.parent.outFields,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return F(e,s,e.parent.outFields,!0,n,l)}return null}return null}async function j(e,t,a,r,n,l,s,i=null){if(u.applicationCache){const o=u.applicationCache.getLayerInfo(e+":"+l.url);if(o)return v(await o,t,a,r,n,s,i)}if(null!=s){const o=s.getCachedPortalItem(l.url,e);if(null!=o)return await v(await o,t,a,r,n,s,i)}const o=new L({id:e,portal:l}).load();u.applicationCache?u.applicationCache.setLayerInfo(e+":"+l.url,o):null!=s&&s.setCachedPortalItem(l.url,e,o);try{return await v(await o,t,a,r,n,s,i)}catch(c){throw u.applicationCache&&u.applicationCache.clearLayerInfo(e+":"+l.url),null!=s&&s.removeCachedPortalItem(l.url,e,o),c}}const q=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function v(e,t,a,r,n,l,s){let i;if("Feature Service"===e.type||"Map Service"===e.type)i=await S(p(e.url??"")+"/"+t,["*"],l);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=l){const t=l.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)i=await t;else{const t=q.has(e.type)?Promise.resolve(new w({data:new I({portalItem:e})})):h.fromPortalItem(e);l.setCachedPortalItemLayer(e.portal.url,e.id,t);try{i=await t}catch(o){throw l.removeCachedPortalItemLayer(e.portal.url,e.id,t),o}}}else i=q.has(e.type)?new w({data:new I({portalItem:e})}):await h.fromPortalItem(e)}return F(i,a,r,n,l,s)}export{T as constructAssociationMetaDataFeatureSetFromUrl,F as constructFeatureSet,j as constructFeatureSetFromPortalItem,A as constructFeatureSetFromRelationship,C as constructFeatureSetFromUrl,b as convertToFeatureSet,D as createFeatureSetCollectionFromMap,M as createFeatureSetCollectionFromService,_ as initialiseMetaDataCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{id as e}from"../../../kernel.js";import t from"../../../request.js";import{neverAbortedSignal as r}from"../../arcadeEnvironment.js";import a from"../../Attachment.js";import i from"../../Dictionary.js";import{throwIfCancelled as s,FeatureSetError as l}from"../support/errorsupport.js";import{RootFeatureSet as n,emptyFeaturesResult as o,assignSpatialReferenceOnFeatures as u}from"../support/FeatureSet.js";import{defaultMaxRecords as c,stableStringify as h,extractServiceUrl as d}from"../support/shared.js";import{toWhereClause as y,isSingleField as p}from"../support/sqlUtils.js";import{decodeStatType as _}from"../support/stats.js";import{splitIntoChunks as m,sliceEquals as f}from"../../../core/arrayUtils.js";import{createMD5Hash as F,outputTypes as w}from"../../../core/MD5.js";import{sqlAnd as S}from"../../../core/sql.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../layers/FeatureLayer.js";import{toQueryStringParameters as R}from"../../../rest/query/operations/queryRelatedRecords.js";import I from"../../../rest/support/AttachmentQuery.js";import T from"../../../rest/support/Query.js";import q from"../../../rest/support/StatisticDefinition.js";function Q(e){if(0===e.length)throw new l("NeverReach");const t=[];for(let a=0;a<e.length;a++){const r=e[a],i=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${a}`];for(let t=0;t<a;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return g.create(r)}function x(e,t){null==e.clause&&(e.clause=Q(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class v extends n{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return c}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+h(e.toJSON());return F(t,w.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new T;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:r})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?o:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,s),n=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=o.includes("*")?this._layer.fields.length:o.length,c=(this.isTable()||!n?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),h=u<=50?1:u<=100?.5:u<=200?.25:.125,d=Math.max(Math.ceil(c*h),t.maxRecordCount??this._maxQueryRate()),p=this._createQuery();return p.where=S(p.where,l),null!=e.spatialFilter&&(p.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),p.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),p.geometry=e.spatialFilter.geometry),p.orderByFields=a,p.outFields=o,p.returnGeometry=n,p.outSpatialReference=this.spatialReference,p.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(p,d,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a){let i;e.num=null!=r?Math.min(r,t):t,e.start=0;do{s(a),i=await this.executeQuery(e,"execute"),yield*m(i.features,this._maxQueryRate()),e.start+=i.features.length,e.num=null!=r?Math.min(r-e.start,t):t}while(e.num>0&&!0===i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,i),n=this._createQuery();n.where=S(n.where,l),null!=e.spatialFilter&&(n.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),n.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),n.geometry=e.spatialFilter.geometry),n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const u=await this.executeQuery(n,"executeForIds");if(s(e.abortSignal),null==u||u.length<=0)return o;let c=this._maxQueryRate();const h=this._layer.capabilities?.query.maxRecordCount;null!=h&&h<c&&(c=h);const d=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,u,c,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),s(a);const l=await this.executeQuery(e,"execute");yield l.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=_(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===p(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??c,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??c,e.abortSignal):{calculated:!1};const o=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const u=this._createQuery();u.where=S(u.where,null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,o)),null!=e.spatialFilter&&(u.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),u.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),u.geometry=e.spatialFilter.geometry);const h=new q;h.statisticType=s,h.onStatisticField=y(n,o),h.outStatisticFieldName="ARCADE_STAT_RESULT",u.returnGeometry=!1;let d="ARCADE_STAT_RESULT";u.outStatistics=[h];const m=await this.executeQuery(u,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new l("InvalidStatResponse");let f=!1;const F=m.fields??[];for(const l of F)if("ARCADE_STAT_RESULT"===l.name.toUpperCase()){d=l.name,"esriFieldTypeDate"===l.type&&(f=!0);break}const w=m.features[0].attributes[d];return{calculated:!0,result:f&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();r.where=S(r.where,null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,t)),null!=e.spatialFilter&&(r.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),r.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),r.geometry=e.spatialFilter.geometry),r.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const i of e.statistics)(!1===i.workingexpr?.isStandardized||!1===p(i.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return o;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,l=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||f(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),l=!0),null==s&&(s=r.slice());const n=e.statistics.map(e=>new q({onStatisticField:null!==e.workingexpr?y(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);const h=null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,t),d=this._createQuery();return d.where=S(d.where,h),null!=e.spatialFilter&&(d.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),d.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),d.geometry=e.spatialFilter.geometry),d.orderByFields=s,d.outFields=["*"],d.outStatistics=n,d.groupByFieldsForStatistics=r,d.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryPaginated(d,u,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryKeysetPaginated(d,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new l("NotImplemented");e.where=S(a,y(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if(s(r),!i.hasOwnProperty("features"))throw new l("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;x(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return u(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const a of t)if(a.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}static create(e,t,r,a,i){const s=new b({url:e,outFields:null===t?["*"]:t});return new v({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return d(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,s,l){function n(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}const o=this._layer;if(!n(o))return[];const u=new I({objectIds:[e],returnMetadata:l});(t&&t>0||r&&r>0)&&(u.size=[t&&t>0?t:0,r&&r>0?r:t+1]),s&&s.length>0&&(u.attachmentTypes=s),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:o,query:u,method:"attachments"});const c=await o.queryAttachments(u);return c?.[e]?c[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let s=null;return l&&t.exifInfo&&(s=i.convertJsonToArcade(t.exifInfo,"system",!0)),new a(t.id,t.name,t.contentType,t.size,r,s,t.keywords??null)}):[]}async queryRelatedFeatures(e){const r=R(e);r.f="json",this._requestStandardised&&(r.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:r,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const a=await t(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:r});if(a.data){const e={},t=a.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)u(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new l("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=S(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?(u(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const t=e?.findCredential(this._layer.url);return t?t.userId:null}async getOwningSystemUrl(){await this.load();const r=e?.findServerInfo(this._layer.url);if(r)return r.owningSystemUrl??"";let a=this._layer.url;const i=a.toLowerCase().indexOf("/rest/services");if(a=i>-1?a.slice(0,i):a,a){a+="/rest/info";try{const e=await t(a,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new v({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,r="serviceItemId"in this._layer?this._layer.serviceItemId:null;const a=this._layer.parsedUrl?.path??null;if(a){const i=await t(a,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,r=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===r?null:r,serviceLayerUrl:""===a?null:a,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}export{v as default};
|
|
2
|
+
import{id as e}from"../../../kernel.js";import t from"../../../request.js";import{neverAbortedSignal as r}from"../../arcadeEnvironment.js";import a from"../../Attachment.js";import i from"../../Dictionary.js";import{throwIfCancelled as s,FeatureSetError as l}from"../support/errorsupport.js";import{RootFeatureSet as n,emptyFeaturesResult as o,getSpatialFilterRelationRestQueryParams as u,assignSpatialReferenceOnFeatures as c}from"../support/FeatureSet.js";import{defaultMaxRecords as d,stableStringify as h,extractServiceUrl as y}from"../support/shared.js";import{toWhereClause as p,isSingleField as _}from"../support/sqlUtils.js";import{decodeStatType as f}from"../support/stats.js";import{splitIntoChunks as m,sliceEquals as F}from"../../../core/arrayUtils.js";import{createMD5Hash as w,outputTypes as g}from"../../../core/MD5.js";import{sqlAnd as S}from"../../../core/sql.js";import b from"../../../core/sql/WhereClause.js";import I from"../../../layers/FeatureLayer.js";import{toQueryStringParameters as R}from"../../../rest/query/operations/queryRelatedRecords.js";import q from"../../../rest/support/AttachmentQuery.js";import T from"../../../rest/support/Query.js";import Q from"../../../rest/support/StatisticDefinition.js";function x(e){if(0===e.length)throw new l("NeverReach");const t=[];for(let a=0;a<e.length;a++){const r=e[a],i=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${a}`];for(let t=0;t<a;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return b.create(r)}function v(e,t){null==e.clause&&(e.clause=x(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class j extends n{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return d}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+h(e.toJSON());return w(t,g.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new T;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:r})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?o:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,s),n=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),c=o.includes("*")?this._layer.fields.length:o.length,d=(this.isTable()||!n?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),h=c<=50?1:c<=100?.5:c<=200?.25:.125,y=Math.max(Math.ceil(d*h),t.maxRecordCount??this._maxQueryRate()),_=this._createQuery();if(_.where=S(_.where,l),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);_.spatialRelationship=t.spatialRelationship,_.relationParameter=t.relationParameter,_.geometry=e.spatialFilter.geometry}return _.orderByFields=a,_.outFields=o,_.returnGeometry=n,_.outSpatialReference=this.spatialReference,_.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(_,y,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a){let i;e.num=null!=r?Math.min(r,t):t,e.start=0;do{s(a),i=await this.executeQuery(e,"execute"),yield*m(i.features,this._maxQueryRate()),e.start+=i.features.length,e.num=null!=r?Math.min(r-e.start,t):t}while(e.num>0&&!0===i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,i),n=this._createQuery();if(n.where=S(n.where,l),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);n.spatialRelationship=t.spatialRelationship,n.relationParameter=t.relationParameter,n.geometry=e.spatialFilter.geometry}n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const c=await this.executeQuery(n,"executeForIds");if(s(e.abortSignal),null==c||c.length<=0)return o;let d=this._maxQueryRate();const h=this._layer.capabilities?.query.maxRecordCount;null!=h&&h<d&&(d=h);const y=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(y,c,d,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),s(a);const l=await this.executeQuery(e,"execute");yield l.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=f(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===_(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??d,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??d,e.abortSignal):{calculated:!1};const o=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const c=this._createQuery();if(c.where=S(c.where,null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,o)),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);c.spatialRelationship=t.spatialRelationship,c.relationParameter=t.relationParameter,c.geometry=e.spatialFilter.geometry}const h=new Q;h.statisticType=s,h.onStatisticField=p(n,o),h.outStatisticFieldName="ARCADE_STAT_RESULT",c.returnGeometry=!1;let y="ARCADE_STAT_RESULT";c.outStatistics=[h];const m=await this.executeQuery(c,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new l("InvalidStatResponse");let F=!1;const w=m.fields??[];for(const l of w)if("ARCADE_STAT_RESULT"===l.name.toUpperCase()){y=l.name,"esriFieldTypeDate"===l.type&&(F=!0);break}const g=m.features[0].attributes[y];return{calculated:!0,result:F&&null!=g?new Date(g):g}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();if(r.where=S(r.where,null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,t)),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}r.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const i of e.statistics)(!1===i.workingexpr?.isStandardized||!1===_(i.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return o;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,l=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||F(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),l=!0),null==s&&(s=r.slice());const n=e.statistics.map(e=>new Q({onStatisticField:null!==e.workingexpr?p(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let c=this._maxQueryRate();const d=this._layer.capabilities?.query.maxRecordCount;null!=d&&d<c&&(c=d);const h=null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,t),y=this._createQuery();if(y.where=S(y.where,h),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);y.spatialRelationship=t.spatialRelationship,y.relationParameter=t.relationParameter,y.geometry=e.spatialFilter.geometry}return y.orderByFields=s,y.outFields=["*"],y.outStatistics=n,y.groupByFieldsForStatistics=r,y.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryPaginated(y,c,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryKeysetPaginated(y,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new l("NotImplemented");e.where=S(a,p(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if(s(r),!i.hasOwnProperty("features"))throw new l("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;v(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return c(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const a of t)if(a.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){const s=new I({url:e,outFields:null===t?["*"]:t});return new j({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return y(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,s,l){function n(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}const o=this._layer;if(!n(o))return[];const u=new q({objectIds:[e],returnMetadata:l});(t&&t>0||r&&r>0)&&(u.size=[t&&t>0?t:0,r&&r>0?r:t+1]),s&&s.length>0&&(u.attachmentTypes=s),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:o,query:u,method:"attachments"});const c=await o.queryAttachments(u);return c?.[e]?c[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let s=null;return l&&t.exifInfo&&(s=i.convertJsonToArcade(t.exifInfo,"system",!0)),new a(t.id,t.name,t.contentType,t.size,r,s,t.keywords??null)}):[]}async queryRelatedFeatures(e){const r=R(e);r.f="json",this._requestStandardised&&(r.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:r,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const a=await t(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:r});if(a.data){const e={},t=a.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)c(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new l("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=S(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?(c(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const t=e?.findCredential(this._layer.url);return t?t.userId:null}async getOwningSystemUrl(){await this.load();const r=e?.findServerInfo(this._layer.url);if(r)return r.owningSystemUrl??"";let a=this._layer.url;const i=a.toLowerCase().indexOf("/rest/services");if(a=i>-1?a.slice(0,i):a,a){a+="/rest/info";try{const e=await t(a,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new j({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,r="serviceItemId"in this._layer?this._layer.serviceItemId:null;const a=this._layer.parsedUrl?.path??null;if(a){const i=await t(a,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,r=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===r?null:r,serviceLayerUrl:""===a?null:a,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}export{j as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{neverAbortedSignal as e}from"../../arcadeEnvironment.js";import{throwIfCancelled as t,FeatureSetError as r}from"../support/errorsupport.js";import{RootFeatureSet as i,emptyFeaturesResult as a,assignSpatialReferenceOnFeatures as s,getSpatialFilterRelationRestQueryParams as l}from"../support/FeatureSet.js";import{defaultMaxRecords as n}from"../support/shared.js";import{toWhereClause as u}from"../support/sqlUtils.js";import{decodeStatType as o}from"../support/stats.js";import{splitIntoChunks as c}from"../../../core/arrayUtils.js";import{sqlAnd as h}from"../../../core/sql.js";import p from"../../../rest/support/StatisticDefinition.js";const y=new FinalizationRegistry(e=>{e.abort()});class d extends i{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return n}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){const e=new d({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:e})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return a;const t={type:"arcade",returnGeometry:this._returnGeometry,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:h(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?u(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{const r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){const r=new AbortController,i=await this._layer.source._queryStream(e,{signal:r.signal}),a=this._iterateParquetStream(i,r,t);return y.register(a,r,r),a}async*_iterateParquetStream(e,r,i){try{for(;;){const a=await this._layer.source._getStreamNextFeatures(e,{signal:r.signal});if(i.aborted&&(r.abort(),t(i)),null==a)break;s(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{y.unregister(r)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();const t=o(e.stat);if("count"===t)return this._queryCount(e);const i=e.field;if(null==i)throw new r("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,i,e.limit??n,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const a=this._createQuery();if(a.returnGeometry=!1,a.where=h(a.where,e.where?u(e.where,0):null),null!=e.spatialFilter){const t=l(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}const s=new p;s.statisticType=t,s.onStatisticField=u(i,0);const c="ARCADE_STAT_RESULT";s.outStatisticFieldName=c,a.outStatistics=[s];const y=await this._layer.source.queryFeaturesJSON(a);if(y.features.length<=0)throw new r("InvalidStatResponse");const d=y.features[0].attributes[c];return{calculated:!0,result:"esriFieldTypeDate"===y.fields?.find(e=>e.name===c)?.type&&null!=d?new Date(d):d}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const t=this._createQuery();if(t.where=h(t.where,e.where?u(e.where,0):null),null!=e.spatialFilter){const r=l(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){await this._ensureLoaded();const t=this._layer.capabilities?.query;return!0===t?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();const r=this._createQuery();return r.where=h(r.where,e.where?u(e.where,0):null),r.orderByFields=e.orderBy?.toOrderByFields(),r.outFields=["*"],r.outStatistics=e.statistics.map(e=>new p({onStatisticField:null!==e.workingexpr?u(e.workingexpr,0):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),r.groupByFieldsForStatistics=e.groupBy,r.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){const i=await this._layer.source.queryFeaturesJSON(r);t(e.abortSignal);for(const e of c(i.features,this._maxQueryRate()))s(e,i.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new r("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../Graphic.js";import{neverAbortedSignal as t}from"../../arcadeEnvironment.js";import a from"./cache.js";import{throwIfCancelled as s,FeatureSetError as r}from"./errorsupport.js";import{QueryIterator as i}from"./FeatureSetIterator.js";import{layerGeometryEsriConstants as n,esriFieldToJson as l,layerGeometryEsriRestConstants as o}from"./shared.js";import{max as u,min as h,sum as d,variance as c,stdev as p,mean as y,distinct as m}from"./stats.js";import{invokeRemoteGeometryOp as f}from"../../geometry/operatorsWorkerConnection.js";import{cacheAsync as _}from"../../../core/iteratorUtils.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../geometry/SpatialReference.js";import{fromJSON as T}from"../../../geometry/support/jsonUtils.js";import F from"../../../layers/support/FieldsIndex.js";function I(e,t){for(const a of e)null!=a.geometry&&(a.geometry.spatialReference??=t)}const w=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class S{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new b({wkid:4326}),this.geometryType=n.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=F.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>_(e)));const a=(await this._allFeatures)();return null==e||e===t?a:async function*(){for await(const t of a)s(e),yield t}()}async databaseType(){if(7===this._databaseType){if(null!==a.applicationCache){const e=a.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.applicationCache&&a.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.applicationCache&&a.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e){if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType}return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new r("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(t){if(this._hasCachedFeatures)return this.iterator(t).next();const a=await this.query({limit:1,abortSignal:t});for await(const s of a.features)if(s.length>0)return e.fromJSON(s[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,a,s){await this._ensureLoaded();let r=await this.queryStat({stat:e,field:t,limit:a,abortSignal:s});return!1===r.calculated&&(r=await this._manualStat(e,t,a,s)),r.result}async _manualStat(e,t,a,s){let r=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const a of e)t+=a.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return r=await m(this,t,a,s),{calculated:!0,result:r};case"avg":case"mean":return r=await y(this,t,s),{calculated:!0,result:r};case"stdev":return r=await p(this,t,s),{calculated:!0,result:r};case"variance":return r=await c(this,t,s),{calculated:!0,result:r};case"sum":return r=await d(this,t,s),{calculated:!0,result:r};case"min":return r=await h(this,t,s),{calculated:!0,result:r};case"max":return r=await u(this,t,s),{calculated:!0,result:r};default:return{calculated:!0,result:0}}}iterator(e){return new i(this,e)}async sumArea(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticArea",[a.geometry,e,t]):await f("area",[a.geometry,e]));return s}async sumLength(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticLength",[a.geometry,e,t]):await f("length",[a.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",g.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,a,s,r){return this._parent.queryAttachments(e,t,a,s,r)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(l(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o[this.geometryType]?"esriGeometryNull":o[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];for await(const a of await this.queryAll(t))for(const t of a){const a={geometry:t.geometry??null,attributes:t.attributes};if(null!==a.geometry&&a.geometry.spatialReference){const{spatialReference:e,...t}=a.geometry;a.geometry=t}e.push(a)}return JSON.stringify({...this.schema(),features:e,spatialReference:this.spatialReference.toJSON()})}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const a=[];for await(const s of await this.queryAll(e))for(const e of s){const s={geometry:e.geometry?!0===t?.keepGeometryType?T(e.geometry):e.geometry:null,attributes:e.attributes};if(null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType){delete s.geometry.spatialReference;const{spatialReference:e,...t}=s.geometry;s.geometry=t}a.push(s)}return{...this.schema(),features:a,spatialReference:!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON()}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class C extends S{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}export{S as FeatureSet,C as RootFeatureSet,I as assignSpatialReferenceOnFeatures,w as emptyFeaturesResult};
|
|
2
|
+
import e from"../../../Graphic.js";import{neverAbortedSignal as t}from"../../arcadeEnvironment.js";import a from"./cache.js";import{throwIfCancelled as s,FeatureSetError as r}from"./errorsupport.js";import{QueryIterator as i}from"./FeatureSetIterator.js";import{layerGeometryEsriConstants as n,esriFieldToJson as l,layerGeometryEsriRestConstants as o}from"./shared.js";import{max as u,min as h,sum as p,variance as c,stdev as d,mean as m,distinct as y}from"./stats.js";import{invokeRemoteGeometryOp as f}from"../../geometry/operatorsWorkerConnection.js";import{cacheAsync as _}from"../../../core/iteratorUtils.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../geometry/SpatialReference.js";import{fromJSON as T}from"../../../geometry/support/jsonUtils.js";import F from"../../../layers/support/FieldsIndex.js";function I(e){switch(e){case"esriSpatialRelIntersects":return{spatialRelationship:"intersects",relationParameter:null};case"esriSpatialRelContains":return{spatialRelationship:"contains",relationParameter:null};case"esriSpatialRelOverlaps":return{spatialRelationship:"overlaps",relationParameter:null};case"esriSpatialRelWithin":return{spatialRelationship:"within",relationParameter:null};case"esriSpatialRelTouches":return{spatialRelationship:"touches",relationParameter:null};case"esriSpatialRelCrosses":return{spatialRelationship:"crosses",relationParameter:null};case"esriSpatialRelEnvelopeIntersects":return{spatialRelationship:"envelope-intersects",relationParameter:null};default:if(e.includes("esriSpatialRelRelation"))return{spatialRelationship:"relation",relationParameter:e.split(":")[1]};throw new r("NeverReach")}}function w(e,t){for(const a of e)null!=a.geometry&&(a.geometry.spatialReference??=t)}const S=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class R{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new b({wkid:4326}),this.geometryType=n.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=F.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>_(e)));const a=(await this._allFeatures)();return null==e||e===t?a:async function*(){for await(const t of a)s(e),yield t}()}async databaseType(){if(7===this._databaseType){if(null!==a.applicationCache){const e=a.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.applicationCache&&a.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.applicationCache&&a.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e){if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType}return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new r("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(t){if(this._hasCachedFeatures)return this.iterator(t).next();const a=await this.query({limit:1,abortSignal:t});for await(const s of a.features)if(s.length>0)return e.fromJSON(s[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,a,s){await this._ensureLoaded();let r=await this.queryStat({stat:e,field:t,limit:a,abortSignal:s});return!1===r.calculated&&(r=await this._manualStat(e,t,a,s)),r.result}async _manualStat(e,t,a,s){let r=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const a of e)t+=a.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return r=await y(this,t,a,s),{calculated:!0,result:r};case"avg":case"mean":return r=await m(this,t,s),{calculated:!0,result:r};case"stdev":return r=await d(this,t,s),{calculated:!0,result:r};case"variance":return r=await c(this,t,s),{calculated:!0,result:r};case"sum":return r=await p(this,t,s),{calculated:!0,result:r};case"min":return r=await h(this,t,s),{calculated:!0,result:r};case"max":return r=await u(this,t,s),{calculated:!0,result:r};default:return{calculated:!0,result:0}}}iterator(e){return new i(this,e)}async sumArea(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticArea",[a.geometry,e,t]):await f("area",[a.geometry,e]));return s}async sumLength(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticLength",[a.geometry,e,t]):await f("length",[a.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",g.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,a,s,r){return this._parent.queryAttachments(e,t,a,s,r)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(l(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o[this.geometryType]?"esriGeometryNull":o[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];for await(const a of await this.queryAll(t))for(const t of a){const a={geometry:t.geometry??null,attributes:t.attributes};if(null!==a.geometry&&a.geometry.spatialReference){const{spatialReference:e,...t}=a.geometry;a.geometry=t}e.push(a)}return JSON.stringify({...this.schema(),features:e,spatialReference:this.spatialReference.toJSON()})}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const a=[];for await(const s of await this.queryAll(e))for(const e of s){const s={geometry:e.geometry?!0===t?.keepGeometryType?T(e.geometry):e.geometry:null,attributes:e.attributes};if(null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType){delete s.geometry.spatialReference;const{spatialReference:e,...t}=s.geometry;s.geometry=t}a.push(s)}return{...this.schema(),features:a,spatialReference:!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON()}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class C extends R{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}export{R as FeatureSet,C as RootFeatureSet,w as assignSpatialReferenceOnFeatures,S as emptyFeaturesResult,I as getSpatialFilterRelationRestQueryParams};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{ArcadeDate as e}from"../../ArcadeDate.js";import{DateOnly as i}from"../../../core/sql/DateOnly.js";import{TimeOnly as r}from"../../../core/sql/TimeOnly.js";import t from"../../../layers/support/Field.js";import{DateTime as n}from"luxon";function o(e){return t.fromJSON(e.toJSON())}function l(e){return e.toJSON?e.toJSON():e}function s(e){return"string"==typeof e||e instanceof String}function y(e){return"boolean"==typeof e}function p(e){return"number"==typeof e}function u(e){return Array.isArray(e)}function c(e){return e instanceof Date}function m(e){return e instanceof n}function a(i){return i instanceof e}function f(e){return e instanceof i}function d(e){return e instanceof r}function T(e,i){return e===i||!(!c(e)&&!a(e)||!c(i)&&!a(i))&&e.getTime()===i.getTime()}function g(e){const i={};for(const r in e)i[r]=e[r];return i}function F(e,i){return e===i||("point"===e&&"esriGeometryPoint"===i||("polyline"===e&&"esriGeometryPolyline"===i||("polygon"===e&&"esriGeometryPolygon"===i||("extent"===e&&"esriGeometryEnvelope"===i||("multipoint"===e&&"esriGeometryMultipoint"===i||("point"===i&&"esriGeometryPoint"===e||("polyline"===i&&"esriGeometryPolyline"===e||("polygon"===i&&"esriGeometryPolygon"===e||("extent"===i&&"esriGeometryEnvelope"===e||"multipoint"===i&&"esriGeometryMultipoint"===e)))))))))}const G=1e3;function O(e){return function(i){e.reject(i)}}function b(e,i){return function(){try{e.apply(null,arguments)}catch(r){i.reject(r)}}}const S={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},D={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},P={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function v(e){switch(e){case"point":default:return"esriGeometryPoint";case"polygon":return"esriGeometryPolygon";case"multipoint":return"esriGeometryMultipoint";case"polyline":return"esriGeometryPolyline"}}function I(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function J(e,i){i||(i={}),"function"==typeof i&&(i={cmp:i});const r="boolean"==typeof i.cycles&&i.cycles,t=i.cmp&&(n=i.cmp,function(e){return function(i,r){const t={key:i,value:e[i]},o={key:r,value:e[r]};return n(t,o)}});var n;const o=[];return function e(i){if(i?.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===i)return;if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);let n,l;if(Array.isArray(i)){for(l="[",n=0;n<i.length;n++)n&&(l+=","),l+=e(i[n])||"null";return l+"]"}if(null===i)return"null";if(o.includes(i)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=o.push(i)-1,y=Object.keys(i).sort(t?.(i));for(l="",n=0;n<y.length;n++){const r=y[n],t=e(i[r]);t&&(l&&(l+=","),l+=JSON.stringify(r)+":"+t)}return o.splice(s,1),"{"+l+"}"}(e)}function M(e){switch(e.type){case"catalog-footprint":case"catalog":case"csv":case"feature":case"geojson":case"knowledge-graph-sublayer":case"oriented-imagery":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}export{b as callback,g as cloneAttributes,o as cloneField,G as defaultMaxRecords,T as equalityTest,O as errback,l as esriFieldToJson,I as extractServiceUrl,a as isArcadeDate,f as isArcadeDateOnly,d as isArcadeTime,u as isArray,y as isBoolean,c as isDate,m as isLuxonDate,p as isNumber,s as isString,M as isSupportedLayer,P as layerFieldEsriConstants,S as layerGeometryEsriConstants,D as layerGeometryEsriRestConstants,F as sameGeomType,J as stableStringify,v as toEsriGeometryType};
|
|
2
|
+
import{ArcadeDate as e}from"../../ArcadeDate.js";import{DateOnly as i}from"../../../core/sql/DateOnly.js";import{TimeOnly as r}from"../../../core/sql/TimeOnly.js";import t from"../../../layers/support/Field.js";import{DateTime as n}from"luxon";function o(e){return t.fromJSON(e.toJSON())}function l(e){return e.toJSON?e.toJSON():e}function s(e){return"string"==typeof e||e instanceof String}function y(e){return"boolean"==typeof e}function p(e){return"number"==typeof e}function u(e){return Array.isArray(e)}function c(e){return e instanceof Date}function m(e){return e instanceof n}function a(i){return i instanceof e}function f(e){return e instanceof i}function d(e){return e instanceof r}function T(e,i){return e===i||!(!c(e)&&!a(e)||!c(i)&&!a(i))&&e.getTime()===i.getTime()}function g(e){const i={};for(const r in e)i[r]=e[r];return i}function F(e,i){return e===i||("point"===e&&"esriGeometryPoint"===i||("polyline"===e&&"esriGeometryPolyline"===i||("polygon"===e&&"esriGeometryPolygon"===i||("extent"===e&&"esriGeometryEnvelope"===i||("multipoint"===e&&"esriGeometryMultipoint"===i||("point"===i&&"esriGeometryPoint"===e||("polyline"===i&&"esriGeometryPolyline"===e||("polygon"===i&&"esriGeometryPolygon"===e||("extent"===i&&"esriGeometryEnvelope"===e||"multipoint"===i&&"esriGeometryMultipoint"===e)))))))))}const G=1e3;function O(e){return function(i){e.reject(i)}}function b(e,i){return function(){try{e.apply(null,arguments)}catch(r){i.reject(r)}}}const S={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},D={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},P={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function v(e){switch(e){case"point":default:return"esriGeometryPoint";case"polygon":return"esriGeometryPolygon";case"multipoint":return"esriGeometryMultipoint";case"polyline":return"esriGeometryPolyline"}}function I(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function J(e,i){i||(i={}),"function"==typeof i&&(i={cmp:i});const r="boolean"==typeof i.cycles&&i.cycles,t=i.cmp&&(n=i.cmp,function(e){return function(i,r){const t={key:i,value:e[i]},o={key:r,value:e[r]};return n(t,o)}});var n;const o=[];return function e(i){if(i?.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===i)return;if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);let n,l;if(Array.isArray(i)){for(l="[",n=0;n<i.length;n++)n&&(l+=","),l+=e(i[n])||"null";return l+"]"}if(null===i)return"null";if(o.includes(i)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=o.push(i)-1,y=Object.keys(i).sort(t?.(i));for(l="",n=0;n<y.length;n++){const r=y[n],t=e(i[r]);t&&(l&&(l+=","),l+=JSON.stringify(r)+":"+t)}return o.splice(s,1),"{"+l+"}"}(e)}function M(e){switch(e.type){case"catalog-footprint":case"catalog":case"csv":case"feature":case"geojson":case"knowledge-graph-sublayer":case"oriented-imagery":case"parquet":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}export{b as callback,g as cloneAttributes,o as cloneField,G as defaultMaxRecords,T as equalityTest,O as errback,l as esriFieldToJson,I as extractServiceUrl,a as isArcadeDate,f as isArcadeDateOnly,d as isArcadeTime,u as isArray,y as isBoolean,c as isDate,m as isLuxonDate,p as isNumber,s as isString,M as isSupportedLayer,P as layerFieldEsriConstants,S as layerGeometryEsriConstants,D as layerGeometryEsriRestConstants,F as sameGeomType,J as stableStringify,v as toEsriGeometryType};
|
package/arcade.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import type CSVLayer from "./layers/CSVLayer.js";
|
|
|
28
28
|
import type FeatureLayer from "./layers/FeatureLayer.js";
|
|
29
29
|
import type GeoJSONLayer from "./layers/GeoJSONLayer.js";
|
|
30
30
|
import type OrientedImageryLayer from "./layers/OrientedImageryLayer.js";
|
|
31
|
+
import type ParquetLayer from "./layers/ParquetLayer.js";
|
|
31
32
|
import type SubtypeGroupLayer from "./layers/SubtypeGroupLayer.js";
|
|
32
33
|
import type WFSLayer from "./layers/WFSLayer.js";
|
|
33
34
|
import type CatalogFootprintLayer from "./layers/catalog/CatalogFootprintLayer.js";
|
|
@@ -40,7 +41,7 @@ import type { Breakpoint, Debugger, DebugValue } from "./arcade/debug.js";
|
|
|
40
41
|
import type { GeometryUnion } from "./geometry/types.js";
|
|
41
42
|
|
|
42
43
|
/** Layer types that may be used to construct Arcade FeatureSets. */
|
|
43
|
-
export type ArcadeSupportedFeatureSetLayerUnion = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | KnowledgeGraphSublayer | OrientedImageryLayer | SubtypeGroupLayer | SubtypeSublayer | WFSLayer;
|
|
44
|
+
export type ArcadeSupportedFeatureSetLayerUnion = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | KnowledgeGraphSublayer | OrientedImageryLayer | ParquetLayer | SubtypeGroupLayer | SubtypeSublayer | WFSLayer;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* Creates a [Profile](https://developers.arcgis.com/javascript/latest/references/core/arcade/#Profile) definition for an Arcade profile implemented in the ArcGIS Maps SDK for JavaScript.
|
package/arcgisGlobal.d.ts
CHANGED
|
@@ -302,9 +302,11 @@ export interface ArcgisImportModules {
|
|
|
302
302
|
"@arcgis/core/graphic/VoxelGraphicOrigin.js": typeof import("./graphic/VoxelGraphicOrigin.js").default;
|
|
303
303
|
"@arcgis/core/graphic/WCSGraphicOrigin.js": typeof import("./graphic/WCSGraphicOrigin.js").default;
|
|
304
304
|
"@arcgis/core/graphic/WFSGraphicOrigin.js": typeof import("./graphic/WFSGraphicOrigin.js").default;
|
|
305
|
+
"@arcgis/core/graphic/isAnnotationFeatureGraphicOrigin.js": typeof import("./graphic/isAnnotationFeatureGraphicOrigin.js");
|
|
305
306
|
"@arcgis/core/graphic/isBuildingGraphicOrigin.js": typeof import("./graphic/isBuildingGraphicOrigin.js");
|
|
306
307
|
"@arcgis/core/graphic/isCSVGraphicOrigin.js": typeof import("./graphic/isCSVGraphicOrigin.js");
|
|
307
308
|
"@arcgis/core/graphic/isCatalogGraphicOrigin.js": typeof import("./graphic/isCatalogGraphicOrigin.js");
|
|
309
|
+
"@arcgis/core/graphic/isDimensionFeatureGraphicOrigin.js": typeof import("./graphic/isDimensionFeatureGraphicOrigin.js");
|
|
308
310
|
"@arcgis/core/graphic/isFeatureGraphicOrigin.js": typeof import("./graphic/isFeatureGraphicOrigin.js");
|
|
309
311
|
"@arcgis/core/graphic/isGeoJSONGraphicOrigin.js": typeof import("./graphic/isGeoJSONGraphicOrigin.js");
|
|
310
312
|
"@arcgis/core/graphic/isGeoRSSGraphicOrigin.js": typeof import("./graphic/isGeoRSSGraphicOrigin.js");
|
|
@@ -403,7 +405,7 @@ export interface ArcgisImportModules {
|
|
|
403
405
|
"@arcgis/core/layers/scene/ModelFileInfo.js": typeof import("./layers/scene/ModelFileInfo.js").default;
|
|
404
406
|
"@arcgis/core/layers/scene/ModelInfo.js": typeof import("./layers/scene/ModelInfo.js").default;
|
|
405
407
|
"@arcgis/core/layers/support/AggregateField.js": typeof import("./layers/support/AggregateField.js").default;
|
|
406
|
-
"@arcgis/core/layers/support/
|
|
408
|
+
"@arcgis/core/layers/support/AnnotationFeatureSublayer.js": typeof import("./layers/support/AnnotationFeatureSublayer.js").default;
|
|
407
409
|
"@arcgis/core/layers/support/BuildingFieldStatistics.js": typeof import("./layers/support/BuildingFieldStatistics.js").default;
|
|
408
410
|
"@arcgis/core/layers/support/BuildingFilter.js": typeof import("./layers/support/BuildingFilter.js").default;
|
|
409
411
|
"@arcgis/core/layers/support/BuildingFilterBlock.js": typeof import("./layers/support/BuildingFilterBlock.js").default;
|