@arcgis/core 5.2.0-next.12 → 5.2.0-next.14
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/arcgisGlobal.d.ts +3 -3
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +1 -0
- package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +1 -0
- package/assets/esri/core/workers/chunks/{8103d06f760a2c79773d.js → 0a8ba5cb857f61de40fb.js} +15 -15
- package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +1 -0
- package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +1 -0
- package/assets/esri/core/workers/chunks/{de541ad390a8d258d2e6.js → 1d5db8746a4f1ed1d18f.js} +1 -1
- package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +1 -0
- package/assets/esri/core/workers/chunks/{2a5176533e78a92d8e5b.js → 20c729fca2e4b4c6b28d.js} +1 -1
- package/assets/esri/core/workers/chunks/23d50c4478f40a7d62bf.js +1 -0
- package/assets/esri/core/workers/chunks/2623cd08487fdc9a94f1.js +1 -0
- package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +1 -0
- package/assets/esri/core/workers/chunks/2c4f10eaf02ef090ee8f.js +1 -0
- package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +1 -0
- package/assets/esri/core/workers/chunks/{34544c79ce568f30a094.js → 31762eb20a9a0ed3f8b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{26dca1d387183282276a.js → 318a2702632aaa4d3a63.js} +1 -1
- package/assets/esri/core/workers/chunks/3526ab3b1f87c24ae6f8.js +1 -0
- package/assets/esri/core/workers/chunks/{0b169bb1969f86232a1a.js → 35b3ff25f5fe24fe15e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{81808c3aead7dfac3049.js → 38cfedce779dd75bd217.js} +1 -1
- package/assets/esri/core/workers/chunks/{5075e85e1eafd431a8c0.js → 39c994536ce6c1e5c956.js} +1 -1
- package/assets/esri/core/workers/chunks/3b74749db78bcba2bc16.js +1 -0
- package/assets/esri/core/workers/chunks/3d83ac791212b81c9d11.js +1 -0
- package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +1 -0
- package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +1 -0
- package/assets/esri/core/workers/chunks/{ef46ef4f0ee9f2aeaa4a.js → 426b8e1e2eef2460851d.js} +1 -1
- package/assets/esri/core/workers/chunks/4376bc2934a996d8bc27.js +1 -0
- package/assets/esri/core/workers/chunks/44d0ca9d4c5f1722688c.js +1 -0
- package/assets/esri/core/workers/chunks/{c187bc997bad61b6c6e9.js → 47f21b65065558d583ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{e25bcfdd8f20f8a08b19.js → 4d57c771af4137f74bfb.js} +1 -1
- package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +1 -0
- package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +1 -0
- package/assets/esri/core/workers/chunks/4f51963815b0d53ffbd9.js +1 -0
- package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +1 -0
- package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +1 -0
- package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +1 -0
- package/assets/esri/core/workers/chunks/{d3c760109a70a71448c5.js → 67773a9f031d9f1d672f.js} +1 -1
- package/assets/esri/core/workers/chunks/6f7193b9ff5942c0d354.js +1 -0
- package/assets/esri/core/workers/chunks/70737052bab29fcaa120.js +1 -0
- package/assets/esri/core/workers/chunks/718d2d430c1a5a940b83.js +1 -0
- package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +1 -0
- package/assets/esri/core/workers/chunks/753e0b21e57c12c742ee.js +1 -0
- package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +1 -0
- package/assets/esri/core/workers/chunks/{1996f0a930abdd97b855.js → 7a8ed08cd173963b3112.js} +1 -1
- package/assets/esri/core/workers/chunks/{4a20f7a0700fd14a129f.js → 7dcf804e1918b94fa4e1.js} +3 -10
- package/assets/esri/core/workers/chunks/{cc697c4d9cdc116373dc.js → 81726d997a2d34449bb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{74e1826ad9e2c4fd3b42.js → 81883bca8a79ee2ddb00.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js → 854c320af09b6afc4b80.js} +2 -2
- package/assets/esri/core/workers/chunks/85505a8b8b0794656d06.js +1 -0
- package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +1 -0
- package/assets/esri/core/workers/chunks/{8407c91cce31e087b41b.js → 886ae23a1d8fa21e531f.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ff7aa216cd794d951e8.js → 8e99f937fd36cf2cd05f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c357c0a08b99c1e7f290.js → 9331969046f2b277d620.js} +1 -1
- package/assets/esri/core/workers/chunks/93d08d82ceab19e314f8.js +1 -0
- package/assets/esri/core/workers/chunks/97a654e8054302582a3b.js +1 -0
- package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +1 -0
- package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +1 -0
- package/assets/esri/core/workers/chunks/{f25bb204cf6727f6fdef.js → a0876a52a3c2ad849370.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ad09ac5793e8d47b4b2.js → a4b970a841b3085500fc.js} +1 -1
- package/assets/esri/core/workers/chunks/aa5f36d7ed59c625ba78.js +1 -0
- package/assets/esri/core/workers/chunks/b045bffb4f2eb9203183.js +1 -0
- package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +1 -0
- package/assets/esri/core/workers/chunks/b9935cc8e2bd4045058a.js +1 -0
- package/assets/esri/core/workers/chunks/{1a527c0740d9f4fa0791.js → bc547cf814d6703cef59.js} +1 -1
- package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +1 -0
- package/assets/esri/core/workers/chunks/bdc66ef2b6ed783047d5.js +1 -0
- package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
- package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +1 -0
- package/assets/esri/core/workers/chunks/bfd1aef8ac795e1ce227.js +1 -0
- package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +1 -0
- package/assets/esri/core/workers/chunks/{0f75c19d8e296a32e329.js → c2cd80b712f29e8cbb8d.js} +1 -1
- package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +1 -0
- package/assets/esri/core/workers/chunks/{8f6833671c071b522923.js → cd66bd30f654fe571e57.js} +1 -1
- package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +1 -0
- package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +1 -0
- package/assets/esri/core/workers/chunks/d2f47f21ce0b0ab4da17.js +262 -0
- package/assets/esri/core/workers/chunks/d3be4d914fc99a1d686c.js +1 -0
- package/assets/esri/core/workers/chunks/dbd2bfcbf3e0f86f07b8.js +1 -0
- package/assets/esri/core/workers/chunks/{6675d56f49d07a97dc40.js → dd0c1cf921369e2bc48b.js} +1 -1
- package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +1 -0
- package/assets/esri/core/workers/chunks/df54e741db40b308c2dd.js +2 -0
- package/assets/esri/core/workers/chunks/{89e09276086745aa21fa.js → e4e2f479c0c45ae1b2c3.js} +1 -1
- package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +1 -0
- package/assets/esri/core/workers/chunks/{58a7cdebc3d182c15ec6.js → e77df11aee136d64ff0f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a474ce61cf484df87b4.js → e80376832050a4b6d28a.js} +1 -1
- package/assets/esri/core/workers/chunks/{f75295cdd5e84eb97d5a.js → e8d65900eefff1152207.js} +1 -1
- package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +1 -0
- package/assets/esri/core/workers/chunks/{3b837b512999e6ab24bc.js → f148666308071bdb185a.js} +1 -1
- package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +1 -0
- package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +1 -0
- package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +1 -0
- package/assets/esri/core/workers/chunks/{893c0d28a5bf3f9f29f1.js → f93facf47aba9b128fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +1 -0
- package/assets/esri/core/workers/chunks/{c911f0b5bdd43b66b731.js → fa3faec65882c5b6f1a0.js} +1 -1
- package/assets/esri/core/workers/chunks/fccc34b86454c56f27ab.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
- package/chunks/{ComponentShader.glsl.js → Component.glsl.js} +11 -11
- package/chunks/GlobalIlluminationBlur.glsl.js +7 -7
- package/chunks/GlowBlur.glsl.js +5 -6
- package/chunks/LineMarker.glsl.js +27 -26
- package/chunks/MeasurementArrow.glsl.js +5 -4
- package/chunks/RibbonLine.glsl.js +1 -8
- package/chunks/Terrain.glsl.js +24 -26
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/bundle2.js +1 -1
- package/config.js +1 -1
- package/core/promiseUtils.d.ts +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/units.js +1 -1
- package/form/types.d.ts +1 -1
- package/geometry/Mesh.d.ts +220 -95
- package/geometry/operators/support/projectionZScaling.js +1 -1
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +35 -13
- package/geometry/support/MeshLocalVertexSpace.d.ts +32 -8
- package/geometry/support/MeshVertexAttributes.d.ts +6 -2
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/zscale.js +1 -1
- package/graphic/{AnnotationGraphicOrigin.d.ts → AnnotationFeatureGraphicOrigin.d.ts} +9 -9
- package/graphic/{AnnotationGraphicOrigin.js → AnnotationFeatureGraphicOrigin.js} +1 -1
- package/interfaces.d.ts +3 -3
- package/kernel.js +1 -1
- package/layers/{AnnotationLayer.d.ts → AnnotationFeatureLayer.d.ts} +24 -24
- package/layers/AnnotationFeatureLayer.js +2 -0
- package/layers/GaussianSplatLayer.d.ts +4 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/sources/parquet/ParquetFileStatistics.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/parquetIdUtils.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/AnnotationSublayer.d.ts +7 -7
- package/layers/support/FeatureEffect.d.ts +3 -2
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersLoader.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/schemaValidator.js +1 -1
- package/layers/types.d.ts +1 -1
- package/networks/Network.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/gaussianSplatLayerItem.js +2 -0
- package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
- package/portal/support/loadUtils.js +1 -1
- package/renderers/support/types.d.ts +1 -1
- package/renderers/visualVariables/RotationVariable.d.ts +1 -16
- package/renderers/visualVariables/RotationVariable.js +1 -1
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -2
- package/rest/knowledgeGraph/ServiceDefinition.d.ts +1 -1
- package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/networks/support/QueryAssociationsParameters.d.ts +2 -2
- package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +2 -2
- package/rest/networks/support/TraceParameters.d.ts +2 -2
- package/rest/support/AttributeBinsQuery.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/TopFeaturesQuery.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/AnnotationFeatureLayerView2D.js +2 -0
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
- package/views/2d/types.d.ts +2 -2
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.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/terrain/Tile.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/{ComponentShader.glsl.js → Component.glsl.js} +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +29 -20
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TexelFormatInfo.js +2 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.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/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +1 -1
- package/views/SceneView.d.ts +1 -1
- package/views/layers/{AnnotationLayerView.d.ts → AnnotationFeatureLayerView.d.ts} +6 -6
- package/views/layers/FeatureLikeLayerView.d.ts +2 -2
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/webdoc/widgets/FloorFilter.d.ts +14 -1
- package/webdoc/widgets/FloorFilter.js +1 -1
- package/webscene/support/AlphaCutoff.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +12 -4
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
- package/widgets/BatchAttributeForm/ValueChangeTransaction.js +2 -0
- package/widgets/BatchAttributeForm/VisibleElements.d.ts +8 -1
- package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/stringUtils.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +19 -3
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.d.ts +3 -3
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.d.ts +3 -3
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.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/FloorFilter/FloorFilterViewModel.d.ts +10 -0
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +0 -1
- package/assets/esri/core/workers/chunks/0bb159ba0226122465cf.js +0 -1
- package/assets/esri/core/workers/chunks/160e5b99f1097a473e6b.js +0 -1
- package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +0 -1
- package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +0 -1
- package/assets/esri/core/workers/chunks/24810c36ae09bb4e83dc.js +0 -1
- package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +0 -1
- package/assets/esri/core/workers/chunks/297ae764445e6f73a5ea.js +0 -1
- package/assets/esri/core/workers/chunks/29aba121db7f00e0cf81.js +0 -1
- package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +0 -1
- package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +0 -1
- package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +0 -1
- package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +0 -1
- package/assets/esri/core/workers/chunks/40b3cdf81c79bbc44527.js +0 -2
- package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +0 -1
- package/assets/esri/core/workers/chunks/426156137f279d979ddd.js +0 -1
- package/assets/esri/core/workers/chunks/4714241189c13d0db897.js +0 -1
- package/assets/esri/core/workers/chunks/537c5dd4cd0a067199d1.js +0 -1
- package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +0 -1
- package/assets/esri/core/workers/chunks/5437a1c05c1bd2175981.js +0 -1
- package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +0 -1
- package/assets/esri/core/workers/chunks/5c7aff9604b4576a0e1d.js +0 -1
- package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +0 -1
- package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
- package/assets/esri/core/workers/chunks/603177137eb680afe371.js +0 -1
- package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +0 -1
- package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +0 -1
- package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +0 -1
- package/assets/esri/core/workers/chunks/6f0341cfa4c68e6e60b3.js +0 -1
- package/assets/esri/core/workers/chunks/70229007d594536ba6a3.js +0 -1
- package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +0 -1
- package/assets/esri/core/workers/chunks/890b7a1153b7f65eba9a.js +0 -1
- package/assets/esri/core/workers/chunks/9660ae52fb3951a19e9c.js +0 -1
- package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +0 -1
- package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +0 -1
- package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +0 -1
- package/assets/esri/core/workers/chunks/b895674c0550826ecb28.js +0 -262
- package/assets/esri/core/workers/chunks/c3cf9e6e91f71c9cc5f3.js +0 -1
- package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
- package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +0 -1
- package/assets/esri/core/workers/chunks/d122431f3b0b88dcb488.js +0 -1
- package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +0 -1
- package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +0 -1
- package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
- package/assets/esri/core/workers/chunks/d468994822f9bc3d6279.js +0 -1
- package/assets/esri/core/workers/chunks/d63f532dd7d60ee8ef2c.js +0 -1
- package/assets/esri/core/workers/chunks/d64613209a9eb1eafb11.js +0 -1
- package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +0 -1
- package/assets/esri/core/workers/chunks/d8ec0afb2b91ccf32e55.js +0 -1
- package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +0 -1
- package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
- package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +0 -1
- package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +0 -1
- package/assets/esri/core/workers/chunks/e5837e5ac6ef761f26a2.js +0 -1
- package/assets/esri/core/workers/chunks/e82488b9b3bb0c1dedb4.js +0 -1
- package/assets/esri/core/workers/chunks/f274a8e8c7ca4294e876.js +0 -1
- package/assets/esri/core/workers/chunks/f292c2c22a3822343118.js +0 -1
- package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +0 -1
- package/assets/esri/core/workers/chunks/f6d047358d14328f3622.js +0 -1
- package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +0 -1
- package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +0 -1
- package/layers/AnnotationLayer.js +0 -2
- package/views/2d/layers/AnnotationLayerView2D.js +0 -2
- /package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js.LICENSE.txt → 854c320af09b6afc4b80.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{40b3cdf81c79bbc44527.js.LICENSE.txt → df54e741db40b308c2dd.js.LICENSE.txt} +0 -0
- /package/views/layers/{AnnotationLayerView.js → AnnotationFeatureLayerView.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class o extends r{constructor(){super(...arguments),this.enableOITOffset=!1,this.transparent=!1,this.writeDepth=!0,this.polygonOffset=3,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.renderOccluded=!1,this.textureCoordinateType=0}}e([t()],o.prototype,"enableOITOffset",void 0),e([t()],o.prototype,"transparent",void 0),e([t()],o.prototype,"writeDepth",void 0);export{o as MeasurementArrowTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class o extends r{constructor(){super(...arguments),this.hasVertexColors=!1,this.transparent=!1,this.hasOccludees=!1,this.writeDepth=!0,this.draped=!1,this.snowCover=!1,this.renderOccluded=!1,this.emissionSource=0,this.textureCoordinateType=0}}e([t()],o.prototype,"hasVertexColors",void 0),e([t()],o.prototype,"transparent",void 0),e([t()],o.prototype,"hasOccludees",void 0),e([t()],o.prototype,"writeDepth",void 0);export{o as NativeLineTechniqueConfiguration};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isColor as o,isOITColor as
|
|
3
|
-
void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
6
|
-
${
|
|
2
|
+
import{isColor as o,isOITColor as i,isOITFrontFace as l}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as a}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{emissionDimming as e}from"../core/shaderLibrary/util/EmissionDimming.glsl.js";import{If as n,glsl as t}from"../core/shaderModules/glsl.js";import{alphaCutoff as f}from"./alphaCutoff.glsl.js";import{ditherNoise as m}from"./ditherNoise.glsl.js";import{oitResolution as u}from"./oitResolution.glsl.js";function d(d,g){d.include(s,g),d.include(r,g);const{fragment:c,outputs:p}=d;c.include(a);const{output:C,hasEmission:h,oitPremultipliedAlpha:b,snowCover:v,emissionDimmingPass:y,renderOccluded:E}=g,$=11===C,j=i(C),O=l(C),A=o(C)&&!j,L=0!==C||E;let S=0;(A||j)&&p.add("fragColor","vec4",S++),j&&p.add("fragAlpha","float",S++),h&&p.add("fragEmission","vec4",S++),c.include(a),c.include(f),c.include(u,g),c.include(m,g),y&&c.include(e),c.code.add(t`
|
|
3
|
+
void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${n(v,", float snow")}) {
|
|
4
|
+
${n($,"finalColor.a = 1.0;")}
|
|
5
|
+
${n(L,"if (finalColor.a < alphaCutoff) discard;")}
|
|
6
|
+
${n(j||h,"float noise = ditherNoise(finalColor);")}
|
|
7
7
|
|
|
8
|
-
${
|
|
9
|
-
${
|
|
10
|
-
${
|
|
11
|
-
${
|
|
8
|
+
${n(j,`fragColor = ${n(b,"finalColor","premultiplyAlpha(finalColor)")};\n fragColor.rgb = fragColor.rgb * floatBlendOutputScale + noise;\n fragAlpha = finalColor.a * floatBlendOutputScale + noise;\n `)}
|
|
9
|
+
${n(O&&b,"finalColor.rgb /= finalColor.a;")}
|
|
10
|
+
${n(A,"fragColor = finalColor;")}
|
|
11
|
+
${n(h,y?"fragEmission = vec4(emissionDimming(premultiplyAlpha(finalColor).rgb, 1.0 - finalColor.a), 0.0);":`fragEmission = ${n(v,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n fragEmission = vec4(fragEmission.rgb * floatBlendOutputScale + noise, fragEmission.a);`)}
|
|
12
12
|
calculateOcclusionAndOutputHighlight();
|
|
13
|
-
${
|
|
13
|
+
${n($,"outputObjectAndLayerIdColor();")}
|
|
14
14
|
}
|
|
15
15
|
`)}export{d as outputColorHighlightOLID};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{parameter as
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as t}from"../materials/TriangleTechniqueConfiguration.js";class s extends t{constructor(){super(...arguments),this.cullFace=0,this.style=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasOccludees=!1,this.hasVVColor=!1,this.draped=!1,this.textureCoordinateType=0,this.writeDepth=!0,this.hasVVInstancing=!1,this.hasVVSize=!1,this.hasVVOpacity=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}}function r(o,e,t,s){return o.draped?null:o.hasVVColor?s:o.hasVertexColors?t:e}o([e({count:3})],s.prototype,"cullFace",void 0),o([e({count:6})],s.prototype,"style",void 0),o([e({count:8})],s.prototype,"emissionSource",void 0),o([e()],s.prototype,"hasVertexColors",void 0),o([e()],s.prototype,"hasOccludees",void 0),o([e()],s.prototype,"hasVVColor",void 0),o([e()],s.prototype,"draped",void 0);export{s as PatternTechniqueConfiguration,r as selectByPatternConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";const i=16,r=8;class s extends e{constructor(o){super(),this.spherical=o,this.capType=0,this.emissionSource=0,this.animation=2,this.polygonOffsetIndex=0,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.numJoinSubdivisions=1,this.roundJoins=!1,this.applyMarkerOffset=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.wireframe=!1,this.
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";const i=16,r=8;class s extends e{constructor(o){super(),this.spherical=o,this.capType=0,this.emissionSource=0,this.animation=2,this.polygonOffsetIndex=0,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.numJoinSubdivisions=1,this.roundJoins=!1,this.applyMarkerOffset=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.wireframe=!1,this.hasScreenSizePerspective=!1,this.worldSizedImagePattern=!1,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}get hasAnimation(){return 0!==this.animation}}o([t({count:3})],s.prototype,"capType",void 0),o([t({count:8})],s.prototype,"emissionSource",void 0),o([t({count:4})],s.prototype,"animation",void 0),o([t({count:i})],s.prototype,"polygonOffsetIndex",void 0),o([t()],s.prototype,"writeDepth",void 0),o([t()],s.prototype,"draped",void 0),o([t()],s.prototype,"stippleEnabled",void 0),o([t()],s.prototype,"stippleOffColorEnabled",void 0),o([t()],s.prototype,"stipplePreferContinuous",void 0),o([t({count:r})],s.prototype,"numJoinSubdivisions",void 0),o([t()],s.prototype,"roundJoins",void 0),o([t()],s.prototype,"applyMarkerOffset",void 0),o([t()],s.prototype,"hasVVSize",void 0),o([t()],s.prototype,"hasVVColor",void 0),o([t()],s.prototype,"hasVVOpacity",void 0),o([t()],s.prototype,"falloffEnabled",void 0),o([t()],s.prototype,"innerColorEnabled",void 0),o([t()],s.prototype,"hasOccludees",void 0),o([t()],s.prototype,"occluder",void 0),o([t()],s.prototype,"wireframe",void 0),o([t()],s.prototype,"hasScreenSizePerspective",void 0),o([t()],s.prototype,"worldSizedImagePattern",void 0);export{r as NUM_JOIN_SUBDIVISION_COUNT,i as POLYGON_OFFSET_INDEX_COUNT,s as RibbonLineTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"../materials/TriangleTechniqueConfiguration.js";class
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"../materials/TriangleTechniqueConfiguration.js";class o extends i{constructor(){super(...arguments),this.cullFace=0,this.writeDepth=!0,this.screenSizeEnabled=!0,this.shadingEnabled=!0,this.textureCoordinateType=0,this.emissionSource=0,this.olidColorInstanced=!1,this.draped=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}}e([t({count:3})],o.prototype,"cullFace",void 0),e([t()],o.prototype,"writeDepth",void 0),e([t()],o.prototype,"screenSizeEnabled",void 0),e([t()],o.prototype,"shadingEnabled",void 0);export{o as ShadedColorMaterialTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";class
|
|
2
|
+
import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";class r extends e{constructor(){super(...arguments),this.draped=!1,this.renderOccluded=!1,this.emissionSource=0,this.snowCover=!1,this.textureCoordinateType=0}}export{r as SlicePlaneMaterialTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 11!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"hasShadowHighlights",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"receiveGlobalIllumination",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{alphaCutoff as o}from"../../../../webscene/support/AlphaCutoff.js";function
|
|
2
|
+
import{alphaCutoff as t,opacityCutoff as o}from"../../../../webscene/support/AlphaCutoff.js";function a(a){a.constants.add("alphaCutoff","float",t),a.constants.add("opacityCutoff","float",o)}export{a as alphaCutoff};
|
package/views/SceneView.d.ts
CHANGED
|
@@ -1130,7 +1130,7 @@ export default class SceneView extends SceneViewSuperclass {
|
|
|
1130
1130
|
*
|
|
1131
1131
|
* The rendering quality settings impacts the level of detail and the maximum number of features that are loaded
|
|
1132
1132
|
* by all layers. A higher quality profile also enables more rendering features, providing better visuals.
|
|
1133
|
-
*
|
|
1133
|
+
* Furthermore, it increases the resolution of shadows, rasterized content such as icons and text, as well as the
|
|
1134
1134
|
* overall rendering resolution on HiDPI displays.
|
|
1135
1135
|
*
|
|
1136
1136
|
* A higher quality profile improves visual quality and detail, but can have a negative impact on drawing performance
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type AnnotationFeatureLayer from "../../layers/AnnotationFeatureLayer.js";
|
|
2
2
|
import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [
|
|
5
|
+
* Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
|
|
6
6
|
* after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in either a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or
|
|
7
7
|
* [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
8
8
|
*
|
|
9
|
-
* The
|
|
9
|
+
* The AnnotationFeatureLayerView is responsible for rendering a [AnnotationFeatureLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
|
|
10
10
|
* features as [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
|
|
11
11
|
*
|
|
12
12
|
* @since 5.1
|
|
13
|
-
* @see [
|
|
13
|
+
* @see [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
|
|
14
14
|
*/
|
|
15
|
-
export default abstract class
|
|
15
|
+
export default abstract class AnnotationFeatureLayerView extends FeatureLikeLayerView {
|
|
16
16
|
/** The layer being viewed. */
|
|
17
|
-
get layer():
|
|
17
|
+
get layer(): AnnotationFeatureLayer;
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type Graphic from "../../Graphic.js";
|
|
2
|
-
import type
|
|
2
|
+
import type AnnotationFeatureLayer from "../../layers/AnnotationFeatureLayer.js";
|
|
3
3
|
import type CSVLayer from "../../layers/CSVLayer.js";
|
|
4
4
|
import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
|
|
5
5
|
import type FeatureLayer from "../../layers/FeatureLayer.js";
|
|
@@ -44,7 +44,7 @@ import type { FeatureFilterProperties } from "../../layers/support/FeatureFilter
|
|
|
44
44
|
* @see [WFSLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/WFSLayerView/)
|
|
45
45
|
* @see [KnowledgeGraphSublayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/KnowledgeGraphSublayerView/)
|
|
46
46
|
*/
|
|
47
|
-
export type FeatureLikeLayerViewLayer =
|
|
47
|
+
export type FeatureLikeLayerViewLayer = AnnotationFeatureLayer | CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
|
|
48
48
|
|
|
49
49
|
/** @since 5.0 */
|
|
50
50
|
export default abstract class FeatureLikeLayerView extends LayerView {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as n,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as Z,collectField as M,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as T}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as L}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&L(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),n(()=>this.view?.floors,"change",()=>this._handleChange()),n(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),n(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);if("floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,P(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),"capabilities"in this.layer){const e=this.layer.capabilities?.data;"returnZ"in this.layer&&e?.supportsZ&&null!=this.layer.returnZ&&(t.returnZ=this.layer.returnZ),"returnM"in this.layer&&e?.supportsM&&null!=this.layer.returnM&&(t.returnM=this.layer.returnM)}return t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const a of e){const e=i(l,a.origin,()=>{const e=h(a.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(a),s.add(e))}if(0===r.length||0===s.size)return[];const n=await this._createPopupQuery(s,t);return await v(this.layer,r,n,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,a=new Set,o=[s?s.collectRequiredFields(a,r):null,R(a,i),e&&"elevationInfo"in i?q(a,i):null,null!=this.filter?_(a,i,this.filter):null,e||null==this.featureEffect?null:_(a,i,this.featureEffect.filter),!e&&n?j(a,i,n):null,!e&&l?O(a,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?T(a,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(a,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(a,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(a,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(a,i.fieldsIndex,[i.timeInfo.endField]),await k(a,i)}if("floorInfo"in i&&i.floorInfo&&C(a,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(a,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(a,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(a,i.fieldsIndex,L(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(Z(a,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(a,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){M(a,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(a,r),R(a,e)]));o.push(Promise.all(e))}if("annotation"===i.type&&M(a,r,i.subtypeField),"catalog-footprint"===i.type&&i.parent){const e=i.parent;C(a,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&M(a,r,m);const u=await Promise.allSettled(o);if(e)M(a,r,i.objectIdField);else for(const t of y(D(i)))M(a,r,t);e&&"displayField"in i&&i.displayField&&M(a,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(a).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const n of e){if(!l){const e=await w(n);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await H(this.layer,n);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,P(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);const V=G;export{V as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as n,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as Z,collectField as M,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as T}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as L}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&L(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),n(()=>this.view?.floors,"change",()=>this._handleChange()),n(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),n(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);if("floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,P(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),"capabilities"in this.layer){const e=this.layer.capabilities?.data;"returnZ"in this.layer&&e?.supportsZ&&null!=this.layer.returnZ&&(t.returnZ=this.layer.returnZ),"returnM"in this.layer&&e?.supportsM&&null!=this.layer.returnM&&(t.returnM=this.layer.returnM)}return t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const a of e){const e=i(l,a.origin,()=>{const e=h(a.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(a),s.add(e))}if(0===r.length||0===s.size)return[];const n=await this._createPopupQuery(s,t);return await v(this.layer,r,n,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,a=new Set,o=[s?s.collectRequiredFields(a,r):null,R(a,i),e&&"elevationInfo"in i?q(a,i):null,null!=this.filter?_(a,i,this.filter):null,e||null==this.featureEffect?null:_(a,i,this.featureEffect.filter),!e&&n?j(a,i,n):null,!e&&l?O(a,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?T(a,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(a,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(a,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(a,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(a,i.fieldsIndex,[i.timeInfo.endField]),await k(a,i)}if("floorInfo"in i&&i.floorInfo&&C(a,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(a,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(a,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(a,i.fieldsIndex,L(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(Z(a,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(a,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){M(a,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(a,r),R(a,e)]));o.push(Promise.all(e))}if("annotation-feature"===i.type&&M(a,r,i.subtypeField),"catalog-footprint"===i.type&&i.parent){const e=i.parent;C(a,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&M(a,r,m);const u=await Promise.allSettled(o);if(e)M(a,r,i.objectIdField);else for(const t of y(D(i)))M(a,r,t);e&&"displayField"in i&&i.displayField&&M(a,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(a).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const n of e){if(!l){const e=await w(n);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await H(this.layer,n);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,P(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);const V=G;export{V as default};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
2
2
|
|
|
3
3
|
/** @since 5.0 */
|
|
4
|
-
export interface FloorFilterProperties extends Partial<Pick<FloorFilter, "enabled" | "facility" | "level" | "longNames" | "minimized" | "pinnedLevels" | "site" | "useVerticalOrder">> {}
|
|
4
|
+
export interface FloorFilterProperties extends Partial<Pick<FloorFilter, "enabled" | "facility" | "floorVisibilityMode" | "level" | "longNames" | "minimized" | "pinnedLevels" | "site" | "useVerticalOrder">> {}
|
|
5
|
+
|
|
6
|
+
/** @since 5.1 */
|
|
7
|
+
export type FloorVisibilityMode = "belowSelected" | "selectedOnly";
|
|
5
8
|
|
|
6
9
|
/**
|
|
7
10
|
* Floor filtering is controlled by a configurable [floor filter](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/). Those configurations are
|
|
@@ -24,6 +27,16 @@ export default class FloorFilter extends JSONSupport {
|
|
|
24
27
|
* @since 5.0
|
|
25
28
|
*/
|
|
26
29
|
accessor facility: string | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates whether the floor filter should display the selected floor and all floors below it or only the selected floor.
|
|
32
|
+
*
|
|
33
|
+
* > [!NOTE]
|
|
34
|
+
* > Floor Visibility mode is only applicable in web scenes.
|
|
35
|
+
*
|
|
36
|
+
* @default "selectedOnly"
|
|
37
|
+
* @since 5.1
|
|
38
|
+
*/
|
|
39
|
+
accessor floorVisibilityMode: FloorVisibilityMode;
|
|
27
40
|
/**
|
|
28
41
|
* Contains the level ID for the initially selected [floor](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/#level), which is used when filtering layers by their configured floor-aware properties.
|
|
29
42
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as r,subclass as s}from"../../core/accessorSupport/decorators.js";import{Integer as l}from"../../core/accessorSupport/ensureType.js";var d;const n=new t({belowSelected:"belowSelected",selectedOnly:"selectedOnly"});let p=d=class extends i{constructor(e){super(e),this.enabled=!1,this.floorVisibilityMode="selectedOnly",this.longNames=!1,this.minimized=!1,this.pinnedLevels=!1,this.site=null,this.facility=null,this.level=null,this.selectedVerticalOrder=null,this.useVerticalOrder=!1}clone(){return new d(o({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site,facility:this.facility,level:this.level,useVerticalOrder:this.useVerticalOrder,selectedVerticalOrder:this.selectedVerticalOrder,floorVisibilityMode:this.floorVisibilityMode}))}};e([r({type:Boolean,json:{read:!0,write:!0}})],p.prototype,"enabled",void 0),e([r({type:n.apiValues,json:{type:n.jsonValues,read:n.read,write:{writer:n.write,overridePolicy:(e,t,i)=>({enabled:null==i||"web-scene"===i?.origin})}}})],p.prototype,"floorVisibilityMode",void 0),e([r({type:Boolean,json:{read:!0,write:!0}})],p.prototype,"longNames",void 0),e([r({type:Boolean,json:{read:!0,write:!0}})],p.prototype,"minimized",void 0),e([r({type:Boolean,json:{read:!0,write:!0}})],p.prototype,"pinnedLevels",void 0),e([r({type:String,json:{read:!0,write:!0}})],p.prototype,"site",void 0),e([r({type:String,json:{read:!0,write:!0}})],p.prototype,"facility",void 0),e([r({type:String,json:{read:!0,write:!0}})],p.prototype,"level",void 0),e([r({type:l,json:{read:!0,write:!0}})],p.prototype,"selectedVerticalOrder",void 0),e([r({type:Boolean,json:{read:!0,write:!0}})],p.prototype,"useVerticalOrder",void 0),p=d=e([s("esri.webdoc.widgets.FloorFilter")],p);const a=p;export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const o=1/255.5;export{o as alphaCutoff};
|
|
2
|
+
const o=1/255.5,t=1-o;export{o as alphaCutoff,t as opacityCutoff};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{fetchMessageBundle as r,onLocaleChange as i}from"../../intl.js";import{multiplyOpacity as s,getContrast as a}from"../../core/colorUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as o,initial as m}from"../../core/reactiveUtils.js";import{formatDecimal as l,formatImperialArea as p,formatMetricArea as c,formatImperialLength as h,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as d,deriveLengthUnitFromAreaUnit as v}from"../../core/units.js";import{property as y,subclass as g}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{isSupported as _,geodesicDensify as w,geodesicLengths as b,geodesicAreas as L}from"../../geometry/geodesicUtils.js";import j from"../../geometry/Point.js";import S from"../../geometry/Polygon.js";import A from"../../geometry/Polyline.js";import{e as k}from"../../chunks/areaOperator.js";import{e as G,l as x}from"../../chunks/geodeticAreaOperator.js";import{e as M,l as O}from"../../chunks/geodeticDensifyOperator.js";import{e as C,l as H}from"../../chunks/geodeticLengthOperator.js";import{e as R}from"../../chunks/lengthOperator.js";import{e as T}from"../../chunks/simplifyOperator.js";import{polygonCentroidPoint as U}from"../../geometry/support/centroid.js";import q from"../../layers/GraphicsLayer.js";import z from"../../symbols/Font.js";import D from"../../symbols/SimpleFillSymbol.js";import P from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/SimpleMarkerSymbol.js";import V from"../../symbols/TextSymbol.js";import{SnappingVisualizer2D as F}from"../../views/2d/interactive/SnappingVisualizer2D.js";import W from"../../views/draw/Draw.js";import{createCoordinateHelper as I}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as B,screenToMap as J,dragManipulatedObject as N}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as K}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as Q}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as X}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Y}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as Z}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as $}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as ee}from"../../views/interactive/snapping/snappingUtils.js";const te=1e5;let re=class extends Q{constructor(e){super(e),this._measurementLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement layer"}),this._manipulatorLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement manipulator layer"}),this._snappingLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement snapping layer"}),this._updatingHandles=new f,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){r("esri/core/t9n/Units").then(e=>{this.messages=e});const e=this.view;this._draw=new W({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([i(async()=>{this.messages=await r("esri/core/t9n/Units")}),o(()=>[this.unit,this.messages],()=>{this._updateGraphics()},m),o(()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor],()=>{if(!this._vertices.length)return;const e=this._vertices.map(({coord:e})=>e);for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)})]),ee(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=n(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=n(this._measurementLayer),this._manipulatorLayer=n(this._manipulatorLayer),this._snappingLayer=n(this._snappingLayer),this._updatingHandles=n(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new Z({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Y(new X("point",I(!1,!1,this.view.spatialReference)),2),visualizer:new F(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this;this._draw.create("polyline",{mode:"click",snappingManager:e}).on(["draw-complete","vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],e=>{this._updateSketch(e.vertices),"draw-complete"===e.type&&this._stopSketch()})}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach(({manipulator:e})=>{e.interactive=!0}),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[i,s]=e[r],a=new j({x:i,y:s,spatialReference:t}),n=ie(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Y.fromGeometry(a,2);o.on("vertex-update",e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())});const m=B(n,(e,t,r,i)=>{const s=this._getSnappingContext(i),{snappingManager:a}=this,n=this._updatingHandles,{snappingStep:m}=$({snappingContext:s,snappingManager:a,updatingHandles:n});t.next(J(this.view)).next(t=>{if("start"===t.action){const r=new j(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t}).next(...m).next(N({operations:o})).next(()=>{e.graphic.geometry=o.data.geometry})});this._vertices.push({manipulator:n,coord:[i,s],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,i=this._vertices[r],[s,a]=e[r];i.coord[0]===s&&i.coord[1]===a||(i.coord=[s,a],i.manipulator.graphic.geometry=new j({x:s,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach(({manipulator:e})=>{e.interactive=null==n||e!==n})}this._updateGraphics()}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=se(this._vertices.map(({coord:e})=>e),this.view.spatialReference);if(!e)return;const{measurement:r,fillGeometry:i,outlineGeometry:n}=e;this._set("measurement",r);const o=r?oe(this.messages,r,this.unit):null;if(this._set("measurementLabel",o),!i&&!n)return;let m,l,p;const{graphics:c}=this._measurementLayer,h=3===c.length,{effectiveTheme:u}=this.view;h?(m=c.at(0),l=c.at(1),p=c.at(2)):(m=new t({symbol:new D({color:s(u.accentColor,.3),outline:null})}),l=new t({symbol:new P({color:u.accentColor,width:2})}),p=new t({symbol:new V({color:u.textColor,font:new z({size:14,family:"sans-serif"}),haloColor:s(a(u.textColor,160),.5),haloSize:2})}),c.removeAll(),c.addMany([m,l,p])),m.geometry=i,l.geometry=n;const d=i?U(i):null,v=d?j.fromJSON(d):null;p.geometry=v,p.symbol.text=o?.area??""}};function ie(e,r,i){const a=8,n={style:"circle",color:s(r.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new E({...n,size:a}),m=new E({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new K({view:r,layer:i,graphic:l,focusedSymbol:m,consumesClicks:!1})}function se(e,t){if(2===e.length){const r=new A({paths:[e],spatialReference:t});let i;return i=t.isGeographic?_(t)?w(r,te):M(r,te,{unit:"meters"}):t.isWebMercator?M(r,te,{unit:"meters"}):r,{measurement:null,fillGeometry:null,outlineGeometry:i}}e.push(e[0]);const r=new A({paths:[e],spatialReference:t}),i=new S({rings:[e],spatialReference:t});let s,a,n=null,o=null;if(t.isGeographic)if(_(t)){if(n=w(r,te),o=w(i,te),o=T(o),!o)return null;s=b([r],"meters")[0],a=L([o],"square-meters")[0]}else{if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}else if(t.isWebMercator){if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}else{if(n=r,o=T(i),!o)return null;s=R(r,{unit:"meters"}),a=k(o,{unit:"square-meters"})}return{measurement:{geometry:o,area:a,perimeter:s},fillGeometry:o,outlineGeometry:n}}function ae(e){return null!=e}async function ne(e){(e?.isGeographic&&!_(e)||e?.isWebMercator)&&await Promise.all([x(),O(),H()])}function oe(e,t,r){if(!t||!e)return null;const i={area:null,perimeter:null},{area:s,perimeter:a}=t;switch(r){case"metric":i.area=c(e,s,"square-meters");break;case"imperial":i.area=p(e,s,"square-meters");break;default:{const t=d(s,"square-meters",r);i.area=l(e,t,r);break}}const n=v(r);if(n)switch(n){case"metric":i.perimeter=u(e,a,"meters");break;case"imperial":i.perimeter=h(e,a,"meters");break;default:{const t=d(a,"meters",n);i.perimeter=l(e,t,n);break}}else i.perimeter="";return i}e([y()],re.prototype,"_drawActive",void 0),e([y({readOnly:!0})],re.prototype,"cursor",null),e([y({value:!0})],re.prototype,"editable",null),e([y({readOnly:!0})],re.prototype,"measurement",void 0),e([y({readOnly:!0})],re.prototype,"measurementLabel",void 0),e([y()],re.prototype,"messages",void 0),e([y({constructOnly:!0})],re.prototype,"snappingManager",void 0),e([y()],re.prototype,"unit",void 0),e([y()],re.prototype,"updating",null),e([y({constructOnly:!0})],re.prototype,"view",void 0),re=e([g("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],re);export{re as AreaMeasurement2DTool,se as createAreaMeasurementInfo2D,oe as createAreaMeasurementLabel,ae as isSupported,ne as loadGeometryOperators};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{fetchMessageBundle as r,onLocaleChange as i}from"../../intl.js";import{multiplyOpacity as s,getContrast as a}from"../../core/colorUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as o,initial as m}from"../../core/reactiveUtils.js";import{formatDecimal as l,formatImperialArea as p,formatMetricArea as c,formatImperialLength as h,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as d,deriveLengthUnitFromAreaUnit as v}from"../../core/units.js";import{property as y,subclass as g}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{isSupported as _,geodesicDensify as w,geodesicLengths as b,geodesicAreas as L}from"../../geometry/geodesicUtils.js";import j from"../../geometry/Point.js";import S from"../../geometry/Polygon.js";import A from"../../geometry/Polyline.js";import{e as k}from"../../chunks/areaOperator.js";import{e as G,l as x}from"../../chunks/geodeticAreaOperator.js";import{e as M,l as O}from"../../chunks/geodeticDensifyOperator.js";import{e as C,l as H}from"../../chunks/geodeticLengthOperator.js";import{e as R}from"../../chunks/lengthOperator.js";import{e as T}from"../../chunks/simplifyOperator.js";import{polygonCentroidPoint as U}from"../../geometry/support/centroid.js";import q from"../../layers/GraphicsLayer.js";import z from"../../symbols/Font.js";import D from"../../symbols/SimpleFillSymbol.js";import P from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/SimpleMarkerSymbol.js";import V from"../../symbols/TextSymbol.js";import{SnappingVisualizer2D as F}from"../../views/2d/interactive/SnappingVisualizer2D.js";import W from"../../views/draw/Draw.js";import{createCoordinateHelper as I}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as B,screenToMap as J,dragManipulatedObject as N}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as K}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as Q}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as X}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Y}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as Z}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as $}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as ee}from"../../views/interactive/snapping/snappingUtils.js";const te=1e5;let re=class extends Q{constructor(e){super(e),this._measurementLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement layer"}),this._manipulatorLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement manipulator layer"}),this._snappingLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement snapping layer"}),this._updatingHandles=new f,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){r("esri/core/t9n/Units").then(e=>{this.messages=e});const e=this.view;this._draw=new W({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([i(async()=>{this.messages=await r("esri/core/t9n/Units")}),o(()=>[this.unit,this.messages],()=>{this._updateGraphics()},m),o(()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor],()=>{if(!this._vertices.length)return;const e=this._vertices.map(({coord:e})=>e);for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)})]),ee(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=n(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=n(this._measurementLayer),this._manipulatorLayer=n(this._manipulatorLayer),this._snappingLayer=n(this._snappingLayer),this._updatingHandles=n(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new Z({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Y(new X("point",I(!1,!1,this.view.spatialReference)),2),visualizer:new F(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this;this._draw.create("polyline",{mode:"click",snappingManager:e}).on(["draw-complete","vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],e=>{this._updateSketch(e.vertices),"draw-complete"===e.type&&this._stopSketch()})}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach(({manipulator:e})=>{e.interactive=!0}),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[i,s]=e[r],a=new j({x:i,y:s,spatialReference:t}),n=ie(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Y.fromGeometry(a,2);o.on("vertex-update",e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())});const m=B(n,(e,t,r,i)=>{const s=this._getSnappingContext(i),{snappingManager:a}=this,n=this._updatingHandles,{snappingStep:m}=$({snappingContext:s,snappingManager:a,updatingHandles:n});t.next(J(this.view)).next(t=>{if("start"===t.action){const r=new j(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t}).next(...m).next(N({operations:o})).next(()=>{e.graphic.geometry=o.data.geometry})});this._vertices.push({manipulator:n,coord:[i,s],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,i=this._vertices[r],[s,a]=e[r];i.coord[0]===s&&i.coord[1]===a||(i.coord=[s,a],i.manipulator.graphic.geometry=new j({x:s,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach(({manipulator:e})=>{e.interactive=null==n||e!==n})}this._updateGraphics()}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=se(this._vertices.map(({coord:e})=>e),this.view.spatialReference);if(!e)return;const{measurement:r,fillGeometry:i,outlineGeometry:n}=e;this._set("measurement",r);const o=r?oe(this.messages,r,this.unit):null;if(this._set("measurementLabel",o),!i&&!n)return;let m,l,p;const{graphics:c}=this._measurementLayer,h=3===c.length,{effectiveTheme:u}=this.view;h?(m=c.at(0),l=c.at(1),p=c.at(2)):(m=new t({symbol:new D({color:s(u.accentColor,.3),outline:null})}),l=new t({symbol:new P({color:u.accentColor,width:2})}),p=new t({symbol:new V({color:u.textColor,font:new z({size:14,family:"sans-serif"}),haloColor:s(a(u.textColor,160),.5),haloSize:2})}),c.removeAll(),c.addMany([m,l,p])),m.geometry=i,l.geometry=n;const d=i?U(i):null,v=d?j.fromJSON(d):null;p.geometry=v,p.symbol.text=o?.area??""}};function ie(e,r,i){const a=8,n={style:"circle",color:s(r.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new E({...n,size:a}),m=new E({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new K({view:r,layer:i,graphic:l,focusedSymbol:m,consumesClicks:!1})}function se(e,t){if(2===e.length){const r=new A({paths:[e],spatialReference:t});let i;return i=t.isGeographic?_(t)?w(r,te):M(r,te,{unit:"meters"}):t.isWebMercator?M(r,te,{unit:"meters"}):r,{measurement:null,fillGeometry:null,outlineGeometry:i}}e.push(e[0]);const r=new A({paths:[e],spatialReference:t}),i=new S({rings:[e],spatialReference:t});let s,a,n=null,o=null;if(t.isGeographic)if(_(t)){if(n=w(r,te),o=w(i,te),o=T(o),!o)return null;s=b([r],"meters")[0],a=L([o],"square-meters")[0]}else{if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}else if(t.isWebMercator){if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),!o||!n)return null;if(o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}else{if(n=r,o=T(i),!o)return null;s=R(r,{unit:"meters"}),a=k(o,{unit:"square-meters"})}return{measurement:{geometry:o,area:a,perimeter:s},fillGeometry:o,outlineGeometry:n}}function ae(e){return null!=e}async function ne(e){(e?.isGeographic&&!_(e)||e?.isWebMercator)&&await Promise.all([x(),O(),H()])}function oe(e,t,r){if(!t||!e)return null;const i={area:null,perimeter:null},{area:s,perimeter:a}=t;switch(r){case"metric":i.area=c(e,s,"square-meters");break;case"imperial":i.area=p(e,s,"square-meters");break;default:{const t=d(s,"square-meters",r);i.area=l(e,t,r);break}}const n=v(r);if(n)switch(n){case"metric":i.perimeter=u(e,a,"meters");break;case"imperial":i.perimeter=h(e,a,"meters");break;default:{const t=d(a,"meters",n);i.perimeter=l(e,t,n);break}}else i.perimeter="";return i}e([y()],re.prototype,"_drawActive",void 0),e([y({readOnly:!0})],re.prototype,"cursor",null),e([y({value:!0})],re.prototype,"editable",null),e([y({readOnly:!0})],re.prototype,"measurement",void 0),e([y({readOnly:!0})],re.prototype,"measurementLabel",void 0),e([y()],re.prototype,"messages",void 0),e([y({constructOnly:!0})],re.prototype,"snappingManager",void 0),e([y()],re.prototype,"unit",void 0),e([y()],re.prototype,"updating",null),e([y({constructOnly:!0})],re.prototype,"view",void 0),re=e([g("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],re);export{re as AreaMeasurement2DTool,se as createAreaMeasurementInfo2D,oe as createAreaMeasurementLabel,ae as isSupported,ne as loadGeometryOperators};
|
|
@@ -2,6 +2,7 @@ import type Graphic from "../../Graphic.js";
|
|
|
2
2
|
import type EsriMap from "../../Map.js";
|
|
3
3
|
import type Collection from "../../core/Collection.js";
|
|
4
4
|
import type UtilityNetworkAssociationType from "../../popup/support/UtilityNetworkAssociationType.js";
|
|
5
|
+
import type Association from "../../rest/networks/support/Association.js";
|
|
5
6
|
import type AttachmentInfo from "../../rest/query/support/AttachmentInfo.js";
|
|
6
7
|
import type AttachmentElementInput from "./inputs/AttachmentElementInput.js";
|
|
7
8
|
import type BatchFormInputs from "./inputs/BatchFormInputs.js";
|
|
@@ -331,6 +332,15 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
|
|
|
331
332
|
* @internal
|
|
332
333
|
*/
|
|
333
334
|
resetAttachmentChanges(elementId: string, attachmentGlobalId: string): void;
|
|
335
|
+
/**
|
|
336
|
+
* Used to indicate that the current feature being edited is part of an association.
|
|
337
|
+
* This is determined outside of BatchAttributeForm, typically used in nested Editor workflows to
|
|
338
|
+
* determine capabilities for the nested workflow e.g. can the association be deleted.
|
|
339
|
+
*
|
|
340
|
+
* @param association - A reference to association the current feature belongs to.
|
|
341
|
+
* @internal
|
|
342
|
+
*/
|
|
343
|
+
setActiveAssociation(association: Association | null | undefined): void;
|
|
334
344
|
/**
|
|
335
345
|
* Used to specify a specific input to view associated layers for.
|
|
336
346
|
* Related to the 'viewing-associated-layers' page.
|
|
@@ -379,22 +389,20 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
|
|
|
379
389
|
*
|
|
380
390
|
* @param fieldName - The name of the field to update.
|
|
381
391
|
* @param value - The value to assign.
|
|
382
|
-
* @param relatedElementId - The elementId of the visible field input that initiated the change.
|
|
383
392
|
* @param features - The features whose field values should be updated.
|
|
384
393
|
* @returns A promise that resolves after mutation, validity reconciliation, and event emission complete.
|
|
385
394
|
* @internal
|
|
386
395
|
*/
|
|
387
|
-
setValueForFieldName(fieldName: string, value: FieldValue,
|
|
396
|
+
setValueForFieldName(fieldName: string, value: FieldValue, features: Iterable<Graphic>): Promise<void>;
|
|
388
397
|
/**
|
|
389
398
|
* Assigns per-feature values to a field using the view model's mutation and event pipeline.
|
|
390
399
|
*
|
|
391
400
|
* @param fieldName - The name of the field to update.
|
|
392
401
|
* @param values - The values to assign, keyed by feature.
|
|
393
|
-
* @param relatedElementId - The elementId of the visible field input that initiated the change.
|
|
394
402
|
* @returns A promise that resolves after mutation, validity reconciliation, and event emission complete.
|
|
395
403
|
* @internal
|
|
396
404
|
*/
|
|
397
|
-
setValuePerFeatureForFieldName(fieldName: string, values: Map<Graphic, FieldValue
|
|
405
|
+
setValuePerFeatureForFieldName(fieldName: string, values: Map<Graphic, FieldValue>): Promise<void>;
|
|
398
406
|
/**
|
|
399
407
|
* @param elementId - Attachment element identifier.
|
|
400
408
|
* @param files - Files to stage for addition.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{pushIfSome as t}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{destroyMaybe as l,abortMaybe as h}from"../../core/maybe.js";import{throwIfAborted as c,isAbortError as u}from"../../core/promiseUtils.js";import p from"../../core/ReactiveMap.js";import{on as m,sync as d,watch as g,syncAndInitial as f,initial as v,whenOnce as A}from"../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as F}from"../../core/support/UpdatingHandles.js";import I from"../../geometry/SpatialReference.js";import{getGraphicLayer as w}from"../../graphic/graphicOriginUtils.js";import{system as E}from"../../time/constants.js";import{getAttachmentKey as x}from"./attachmentUtils.js";import{createReactiveGraphic as C,isAttributeFormSupportedLayerWithAttachments as M,layerSupportsQueryAttachments as V,queryAttachmentsForElements as b}from"./batchAttributeFormUtils.js";import{ReactiveContingentValuesManager as k}from"./ReactiveContingentValuesManager.js";import{ArcadeExecutorProvider as R}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as S}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as L}from"./expressions/ExpressionsModel.js";import T from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as H}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as j,isFieldInput as P,applyFieldValueChanges as N}from"./inputs/support/inputUtils.js";import B from"./templates/BatchFormTemplate.js";import{createBatchFormTemplate as G}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as O,isGroupElementTemplate as U}from"./templates/support/templateUtils.js";import{ContingentValuesManager as D}from"../support/ContingentValuesManager.js";import{isEmptyValue as W}from"../support/forms/formUtils.js";function Z(e,t){return e?.find(e=>e.layer===t)}let $=class extends n{constructor(e){super(e),this._attachmentCache=new p,this.activeFeatureIndex=-1,this.attachmentsEnabled=!1,this.callbacks=null,this.disabled=!1,this.editType="NA",this.features=new a,this._hasAsyncArcadeExpressions=!1,this.highlightHelper=null,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new R,this._activeAssociationsInput=null,this._activeRelationshipInput=null,this._ownContingentValuesManager=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new T({inputs:[]}),this._emptyFormTemplate=new B({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new p,this._updatingHandles=new F,this._submitTask=null,this._layerTemplateMap=new p,this._workingFeatures=new a,this._expressionsManager=new S({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:E}}),this._getExternalErrorForFeature=(e,t)=>this._reactiveContingentValuesManager.getViolationTypeForField(e,t),this._getFieldValueOptionsForFeature=e=>this._reactiveContingentValuesManager.getAndWatchFieldValueOptions(e),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.contingentValuesManager||(this.contingentValuesManager=this._ownContingentValuesManager=new D),this.addHandles([m(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),g(()=>[this.attachmentsEnabled,this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),g(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),g(()=>this.activeFeature,()=>{this.goHome()},d),g(()=>this.page,e=>{const t=[...this.pageStack];if(t.includes(e))for(;t.length&&t.at(-1)!==e;)t.pop();else t.push(e);this.pageStack=t},f),g(()=>this.contingentValuesManager,e=>{l(this._reactiveContingentValuesManager),this._reactiveContingentValuesManager=new k({manager:e})},v)]),this._prepare()}destroy(){this._prepareTask=h(this._prepareTask),this._workingFeatures.destroyAll(),l(this._expressionsManager),l(this._reactiveContingentValuesManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new p,this._emptyForm.destroy(),this._emptyFormTemplate.destroy(),this._ownContingentValuesManager=l(this._ownContingentValuesManager),this.highlightHelper?.removeAll()}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return w(e)??null}get activeAssociationsInput(){return this._activeAssociationsInput}get activeRelationshipInput(){return this._activeRelationshipInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){const e=this.contingentValuesManager;for(const t of this.layers)if(e.getFieldsWithContingentValues(t).size>0)return!0;return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.showingSelectedAttachmentReplacePage&&this.selectedAttachmentDetails?"replacing-attachment":this.selectedAttachmentDetails?"viewing-attachment-details":this.selectedAttachmentAddInput?"adding-attachments":this.selectedAttachmentListInput?"viewing-attachments":this.activeAssociationsInput?.associatedLayer?"viewing-associated-features":this.activeAssociationsInput?"viewing-associated-layers":this.activeRelationshipInput?.showAllRelatedRecords?"viewing-related-records":this.activeRelationshipInput?.showAllCategories?"viewing-related-categories":"default"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(e=>e.valid)}get layers(){const e=new Set;return this.features.forEach(t=>{const s=w(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){if(this.submitHasBeenAttempted=!0,this._validateContingentValues(this._workingFeatures),!this._hasPendingAttachmentHydration)return this._emitSubmit(),Promise.resolve();if(this._submitTask)return this._submitTask.promise;const e=s(async()=>{await Promise.all(this._allAttachmentInputs.map(e=>e.waitForPendingAttachmentUpdateData())),this._emitSubmit()});return this._submitTask=e,e.promise.finally(()=>{this._submitTask===e&&(this._submitTask=null)}),e.promise}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachment",e),null!=e&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachmentAddElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentListElementId=null)}get selectedAttachmentListElementId(){return this._get("selectedAttachmentListElementId")??null}set selectedAttachmentListElementId(e){this._set("selectedAttachmentListElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentAddElementId=null)}get selectedAttachmentListInput(){const e=this.selectedAttachmentListElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get showingSelectedAttachmentReplacePage(){return this._get("showingSelectedAttachmentReplacePage")??!1}set showingSelectedAttachmentReplacePage(e){this._set("showingSelectedAttachmentReplacePage",e&&null!=this.selectedAttachmentDetails)}get selectedAttachmentAddInput(){const e=this.selectedAttachmentAddElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get selectedAttachmentDetails(){const e=this.selectedAttachment,t=this.activeForm;if(!e||!t)return null;const s=t.allAttachmentElementInputs.find(t=>t.template.elementId===e.elementId);if(!s)return null;const a=s.attachments.findIndex(t=>x(t)===e.attachmentKey);if(-1===a)return null;return{attachment:s.attachments[a],input:s}}get _allAttachmentInputs(){const e=[...this.sharedForm.allAttachmentElementInputs];for(const t of this._featureFormMap.values())e.push(...t.allAttachmentElementInputs);return e}get _hasPendingAttachmentHydration(){return this._allAttachmentInputs.some(e=>e.hasPendingAttachmentUpdateData)}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(j(e)){const t=e.inputs.find(e=>P(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(P(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new i("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}async goBack(){switch(this.page){case"replacing-attachment":return void this.setShowingSelectedAttachmentReplacePage(!1);case"viewing-attachment-details":return void this.setSelectedAttachment(null);case"adding-attachments":return void this.setSelectedAttachmentAddElementId(null);case"viewing-attachments":return void this.setSelectedAttachmentListElementId(null);case"viewing-associated-features":return void this.setActiveAssociationsLayer(null);case"viewing-associated-layers":return void this.setActiveAssociationsInput(null);case"viewing-related-categories":case"viewing-related-records":return void this.clearActiveRelationshipCategoryOrInput();default:return}}async goHome(){this.setShowingSelectedAttachmentReplacePage(!1),this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null),this.setSelectedAttachmentListElementId(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.clearAllRelationshipSettings()}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){await this._setFieldValueFromContext(e.features,t,{fieldName:e.fieldName,expressionsManager:e.expressionsManager,fieldInput:e})}async setFieldInputValuePerFeature(e,t){await this._setFieldValuePerFeatureFromContext(t,{fieldName:e.fieldName,expressionsManager:e.expressionsManager,fieldInput:e})}async setValueForFieldName(e,t,s,a){const i=null==a?this._workingFeatures:this._getReactiveGraphics(a);await this._setFieldValueFromContext(i,t,{fieldName:e,expressionsManager:this._expressionsManager,fieldInput:this.findFieldInput(s)??void 0})}async setValuePerFeatureForFieldName(e,t,s){await this._setFieldValuePerFeatureFromContext(this._getReactiveGraphicValueMap(t),{fieldName:e,expressionsManager:this._expressionsManager,fieldInput:this.findFieldInput(s)??void 0})}_getReactiveGraphics(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&t.push(e)}return t}_getReactiveGraphicValueMap(e){const t=new Map;for(const[s,a]of e){const e=this._reactiveGraphicLookup.get(s);e&&t.set(e,a)}return t}async _setFieldValueFromContext(e,t,s){const a=await this._mutateFieldValues(s,e,()=>t);this._emitLegacyValueChangeEvent(e,s.fieldName,t),this._emitValuesChangeEvent(s.fieldName,Q(a,s.fieldName,t))}async _setFieldValuePerFeatureFromContext(e,t){const s=await this._mutateFieldValues(t,e.keys(),t=>e.get(t));if(this._emitValuesChangeEvent(t.fieldName,X(s,t.fieldName,e)),1===e.size){const{value:s}=e.values().next();this._emitLegacyValueChangeEvent(e.keys(),t.fieldName,s)}}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new i("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}async stageAddAttachments(e,t){if(0===t.length)return[];const s=this._findAttachmentInput(e);if(!s)return[];const a=await s.stageAddAttachments(t,this._expressionsManager.arcadeContext);return 0===a.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),a}stageDeleteAttachment(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.stageDeleteAttachment(a),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}async stageRenameAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const i=this._findAttachment(a,t);i&&0!==s.trim().length&&(a.stageRenameAttachment(i,s.trim()),this.userHasChangedValues=!0,await a.ensureStagedUpdateData(i),this._emitAttachmentsChange(a))}async stageReplaceAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return!1;const i=this._findAttachment(a,t);if(!i)return!1;return!!await a.stageReplaceAttachment(i,s,this._expressionsManager.arcadeContext)&&(this.userHasChangedValues=!0,this._emitAttachmentsChange(a),!0)}clearAttachmentChanges(e){const t=this._findAttachmentInput(e);t&&(t.clearAttachmentChanges(),this._emitAttachmentsChange(t))}setActiveAssociationsInput(e){this._activeAssociationsInput=e}setActiveAssociationsLayer(e){this._activeAssociationsInput?.setAssociatedLayer(e)}setActiveAssociationType(e){this._activeAssociationsInput?.setActiveAssociationType(e)}setActiveRelationshipInput(e){e||this._activeRelationshipInput?.setActiveCategory(null),this._activeRelationshipInput=e}setActiveRelationshipCategory(e,t){t.setActiveCategory(e),this.setActiveRelationshipInput(t)}clearAllRelationshipSettings(){const e=this.activeRelationshipInput;e&&(e.setActiveCategory(null),e.setShowAllCategories(!1),e.setShowAllRelatedRecords(!1),this._activeRelationshipInput=null)}clearActiveRelationshipCategoryOrInput(){const e=this.activeRelationshipInput;e&&(e.showAllRelatedRecords?e.showAllCategories?e.setActiveCategory(null):this.setActiveRelationshipInput(null):e.showAllCategories&&(e.setShowAllCategories(!1),this.setActiveRelationshipInput(null)))}resetAttachmentChanges(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.discardStagedEdits(a),this._emitAttachmentsChange(s))}setSelectedAttachment(e){this.selectedAttachment=e??null}setShowingSelectedAttachmentReplacePage(e){this.showingSelectedAttachmentReplacePage=e}setSelectedAttachmentAddElementId(e){this.selectedAttachmentAddElementId=e??null}setSelectedAttachmentListElementId(e){this.selectedAttachmentListElementId=e??null}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?H(t,{allFeatures:new a([e]),expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[s,a]of this._reactiveGraphicLookup){const i=[],n=[],r=this._featureFormMap.get(a)?.allAttachmentElementInputs??[];for(const e of r)t(i,e.toSubmitEdits()),e.valid||n.push(e.template.elementId);e.set(s,{feature:s,values:{...a.attributes},invalidFields:[],attachmentEdits:i,invalidAttachmentElementIds:n})}for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_emitSubmit(){this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}_findAttachmentInput(e){const t=this.activeForm.allAttachmentElementInputs.find(t=>t.template.elementId===e);return t||r.getLogger(this).error(`Attachment input not found for elementId '${e}'`),t}_findAttachment(e,t){const s=e.findAttachment(t);return s||r.getLogger(this).error(`Attachment '${t}' not found for attachment element '${e.template.elementId}'`),s}_makeAttachmentEdits(e){const s=[];for(const a of e.allAttachmentElementInputs)t(s,a.toSubmitEdits());return s}_emitAttachmentsChange(e){const t=e.single.feature;if(!t)return;const s=this._featureFormMap.get(t);this.emit("attachments-change",{name:"attachments-change",feature:t.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}_emitLegacyValueChangeEvent(e,t,s){this.emit("value-change",{name:"value-change",features:Array.from(e,e=>e.source),fieldName:t,value:s})}_emitValuesChangeEvent(e,t){this.emit("values-change",{name:"values-change",fieldName:e,data:t})}_validateContingentValues(e,t=!1){if(t&&!this.submitHasBeenAttempted)for(const s of e)this._reactiveContingentValuesManager.validateContingenciesForNonNullFields(s);else for(const s of e)this._reactiveContingentValuesManager.validateContingencyConstraints(s,{includeIncompleteViolations:!0})}async _trackValidityChange(e,t){await A(()=>!1===this.calculating);const s=new Map(t.map(e=>[e.source,e]));for(const a of this.invalidFeatures)if(!e.has(a)){const e=s.get(a);e&&(e.userChangesHaveMadeInvalid=!0)}}async _mutateFieldValues(e,t,s){const a=new Set(this.invalidFeatures),{expressionsManager:i,fieldInput:n,fieldName:r}=e;n&&(n.userHasChangedValue=!0);const o=await N(r,i,t,s);return o.length>0&&(this.userHasChangedValues=!0),"single"!==this.mode&&1!==this.features.length||this._validateContingentValues([o[0]],!0),await this._trackValidityChange(a,o),o}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=h(this._prepareTask),this._updateWorkingFeatures(),l(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new S({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??I.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{attachmentsEnabled:e,layers:t}=this;if(0===t.length)return;const a=s(async s=>{try{c(s),this.contingentValuesManager.layers.addMany(t);const a=new Map;await Promise.all(t.map(e=>e.load()));for(const i of t){const t=Z(this.layerInfos,i),n=await G(i,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone,attachmentsEnabled:e},t?.formTemplate);c(s),this._layerTemplateMap.set(i,n);const r=n.getExpressionExecutorsForLayer(i);if(this._expressionsManager.layerExpressionsModelMap.set(i,new L({preserveFieldValuesWhenHidden:n.preserveFieldValuesWhenHidden,executorMap:r})),!this._hasAsyncArcadeExpressions)for(const e of r.keys()){const t=r.get(e);if(this._hasAsyncArcadeExpressions=!0===(t.editableExpression?.isAsync||t.requiredExpression?.isAsync||t.valueExpression?.isAsync||t.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const e of n.elements){if(O(e))continue;const t=e.clone();U(t)&&(t.elements=t.elements.filter(e=>!O(e)));const{elementId:s}=t;a.has(s)?a.get(s).foldIn(t):a.set(s,t)}}if(this.hasTooManyComplexFeatures)throw new i("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new i("too-many-features","There are too many features to load into the form.");const n=new B({elements:Array.from(a.values())});this.sharedFormTemplate=n,this.sharedForm=H(n,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray()),await A(()=>!this.contingentValuesManager.updating)}catch(a){throw u(a)||r.getLogger(this).error("Failed preparing form",a),a}});this._updatingHandles.consumePromise(a.promise),this._prepareTask=a}_updateWorkingFeatures(){this._workingFeatures.destroyAll(),this._reactiveContingentValuesManager.reset();for(const t of this._featureFormMap.values())t.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:e}=this;if(this._reactiveGraphicLookup=new p,0!==e.length){this._workingFeatures.addMany(e.map(C));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&M(t)&&V(t)))return;const a=e.getObjectId();if(null==a)return;const i=this._attachmentCache.get(t),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(i){const e=i.get(a);e&&(r=e)}if(!r){r=await b(t,a,n);o(this._attachmentCache,t,()=>new p).set(a,r)}for(const o of n)o.applyFetchedAttachments(J(o,r))}};e([y()],$.prototype,"_attachmentCache",void 0),e([y({readOnly:!0})],$.prototype,"activeFeature",null),e([y()],$.prototype,"activeFeatureIndex",void 0),e([y({readOnly:!0})],$.prototype,"activeForm",null),e([y({readOnly:!0})],$.prototype,"activeLayer",null),e([y()],$.prototype,"activeAssociationsInput",null),e([y()],$.prototype,"activeRelationshipInput",null),e([y()],$.prototype,"attachmentsEnabled",void 0),e([y()],$.prototype,"callbacks",void 0),e([y()],$.prototype,"disabled",void 0),e([y()],$.prototype,"calculating",null),e([y()],$.prototype,"contingentValuesManager",void 0),e([y()],$.prototype,"editType",void 0),e([y()],$.prototype,"features",void 0),e([y()],$.prototype,"expressionEvaluationFailed",null),e([y()],$.prototype,"hasNonActiveInvalidFeatures",null),e([y()],$.prototype,"hasAsyncArcadeExpressions",null),e([y()],$.prototype,"_hasAsyncArcadeExpressions",void 0),e([y()],$.prototype,"invalidFeatures",null),e([y()],$.prototype,"hasVisibleInputs",null),e([y()],$.prototype,"hasLayersWithContingentValues",null),e([y()],$.prototype,"highlightHelper",void 0),e([y()],$.prototype,"maximumFeatureCount",void 0),e([y()],$.prototype,"maximumFeatureCountWithComplexForms",void 0),e([y()],$.prototype,"visibleInputs",null),e([y()],$.prototype,"map",void 0),e([y()],$.prototype,"noVisibleElementsReason",null),e([y()],$.prototype,"page",null),e([y()],$.prototype,"pageStack",void 0),e([y()],$.prototype,"readOnly",void 0),e([y()],$.prototype,"spatialReference",void 0),e([y()],$.prototype,"submitHasBeenAttempted",void 0),e([y()],$.prototype,"timeZone",void 0),e([y()],$.prototype,"updating",null),e([y()],$.prototype,"valid",null),e([y()],$.prototype,"layers",null),e([y()],$.prototype,"mode",null),e([y()],$.prototype,"sharedForm",void 0),e([y()],$.prototype,"sharedFormTemplate",void 0),e([y()],$.prototype,"selectedAttachment",null),e([y()],$.prototype,"selectedAttachmentAddElementId",null),e([y()],$.prototype,"selectedAttachmentListElementId",null),e([y()],$.prototype,"selectedAttachmentListInput",null),e([y()],$.prototype,"showingSelectedAttachmentReplacePage",null),e([y()],$.prototype,"selectedAttachmentAddInput",null),e([y()],$.prototype,"selectedAttachmentDetails",null),e([y()],$.prototype,"userHasChangedValues",void 0),e([y()],$.prototype,"layerInfos",void 0),e([y()],$.prototype,"_arcadeExecutorProvider",void 0),e([y()],$.prototype,"_activeAssociationsInput",void 0),e([y()],$.prototype,"_activeRelationshipInput",void 0),e([y()],$.prototype,"_prepareTask",void 0),e([y()],$.prototype,"_reactiveGraphicLookup",void 0),e([y()],$.prototype,"_allAttachmentInputs",null),e([y()],$.prototype,"_hasPendingAttachmentHydration",null),e([y()],$.prototype,"_layerTemplateMap",void 0),e([y()],$.prototype,"_workingFeatures",void 0),e([y()],$.prototype,"_expressionsManager",void 0),$=e([_("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],$);const z=$;function K(e){return null!=e&&e.trim().length>0}function q(e,t){const s=e.keywords;return K(s)&&s.toLowerCase()===t}function J(e,t){const s="attachment"===e.input?.type?e.input.attachmentAssociationType:"exact",a=e.attachmentKeyword;if("any"===s)return t;if("exactOrNone"===s){if(W(a))return t.filter(e=>!K(e.keywords));const e=a.toLowerCase();return t.filter(t=>!K(t.keywords)||q(t,e))}if(W(a))return t;const i=a.toLowerCase();return t.filter(e=>q(e,i))}function Q(e,t,s){return e.map(e=>({feature:e.source,changes:[{fieldName:t,value:s}]}))}function X(e,t,s){return e.map(e=>({feature:e.source,changes:[{fieldName:t,value:s.get(e)}]}))}export{z as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import{pushIfSome as e}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{destroyMaybe as l,abortMaybe as c}from"../../core/maybe.js";import{throwIfAborted as h,isAbortError as u}from"../../core/promiseUtils.js";import p from"../../core/ReactiveMap.js";import{on as m,sync as d,watch as g,syncAndInitial as f,initial as v,whenOnce as A}from"../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as F}from"../../core/support/UpdatingHandles.js";import I from"../../geometry/SpatialReference.js";import{getGraphicLayer as w}from"../../graphic/graphicOriginUtils.js";import{system as E}from"../../time/constants.js";import{getAttachmentKey as C}from"./attachmentUtils.js";import{getLayerTimeZone as x,getEffectiveTimeZone as M,createReactiveGraphic as b,isAttributeFormSupportedLayerWithAttachments as V,layerSupportsQueryAttachments as k,queryAttachmentsForElements as T}from"./batchAttributeFormUtils.js";import{ReactiveContingentValuesManager as R}from"./ReactiveContingentValuesManager.js";import{parseFormTemplateString as L}from"./stringUtils.js";import{ValueChangeTransaction as S}from"./ValueChangeTransaction.js";import{ArcadeExecutorProvider as H}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as P}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as j}from"./expressions/ExpressionsModel.js";import B from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as O}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as G,isFieldInput as D}from"./inputs/support/inputUtils.js";import U from"./templates/BatchFormTemplate.js";import{createBatchFormTemplate as N}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as Z,isGroupElementTemplate as W}from"./templates/support/templateUtils.js";import{ContingentValuesManager as $}from"../support/ContingentValuesManager.js";import{isEmptyValue as z}from"../support/forms/formUtils.js";function K(t,e){return t?.find(t=>t.layer===e)}let q=class extends n{constructor(t){super(t),this._attachmentCache=new p,this.activeFeatureIndex=-1,this.attachmentsEnabled=!1,this.callbacks=null,this.disabled=!1,this.editType="NA",this.features=new i,this._hasAsyncArcadeExpressions=!1,this.highlightHelper=null,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new H,this._activeAssociation=null,this._activeAssociationsInput=null,this._activeRelationshipInput=null,this._ownContingentValuesManager=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new B({inputs:[]}),this._emptyFormTemplate=new U({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new p,this._updatingHandles=new F,this._submitTask=null,this._layerTemplateMap=new p,this._workingFeatures=new i,this._expressionsManager=new P({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:E}}),this._getExternalErrorForFeature=(t,e)=>this._reactiveContingentValuesManager.getViolationTypeForField(t,e),this._getFieldValueOptionsForFeature=t=>this._reactiveContingentValuesManager.getAndWatchFieldValueOptions(t),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.contingentValuesManager||(this.contingentValuesManager=this._ownContingentValuesManager=new $),this.addHandles([m(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),g(()=>[this.attachmentsEnabled,this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),g(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),g(()=>this.activeFeature,()=>{this.goHome()},d),g(()=>this.page,t=>{const e=[...this.pageStack];if(e.includes(t))for(;e.length&&e.at(-1)!==t;)e.pop();else e.push(t);this.pageStack=e},f),g(()=>this.contingentValuesManager,t=>{l(this._reactiveContingentValuesManager),this._reactiveContingentValuesManager=new R({manager:t})},v)]),this._prepare()}destroy(){this._prepareTask=c(this._prepareTask),this._workingFeatures.destroyAll(),l(this._expressionsManager),l(this._reactiveContingentValuesManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new p,this._emptyForm.destroy(),this._emptyFormTemplate.destroy(),this._ownContingentValuesManager=l(this._ownContingentValuesManager),this.highlightHelper?.removeAll()}get activeFeature(){const t=this.activeFeatureIndex;return t<0?null:this.features.at(t)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const t=this._workingFeatures.at(this.activeFeatureIndex);if(!t)return this._emptyForm;const e=this._featureFormMap.get(t);if(e)return e;const s=this._makeBatchFormInputsForFeature(t);return s!==this._emptyForm&&this._featureFormMap.set(t,s),s}get activeLayer(){const{activeFeature:t}=this;if(!t)return null;return w(t)??null}get activeAssociation(){return this._activeAssociation}get activeAssociationsInput(){return this._activeAssociationsInput}get activeAssociationType(){return this.activeAssociationsInput?.activeAssociationType}get activeRelationshipInput(){return this._activeRelationshipInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get canGoBack(){return this.pageStack.length>1}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:t}=this;return this.invalidFeatures.some(e=>e!==t)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){const t=this.contingentValuesManager;for(const e of this.layers)if(t.getFieldsWithContingentValues(e).size>0)return!0;return!1}get formDescription(){return this._computeFormHeaderField(this.activeForm?.description)}get formTitle(){return this._computeFormHeaderField(this.activeForm?.title)}get effectiveTimeZone(){const{activeLayer:t,timeZone:e}=this;if(!t)return e??"system";const s=x(t);return M(e,s)}get visibleInputs(){return this.activeForm.inputs.filter(t=>t.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const t=new Set;for(const e of this.activeForm.inputs)switch(e.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":t.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":t.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return t.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.showingSelectedAttachmentReplacePage&&this.selectedAttachmentDetails?"replacing-attachment":this.selectedAttachmentDetails?"viewing-attachment-details":this.selectedAttachmentAddInput?"adding-attachments":this.selectedAttachmentListInput?"viewing-attachments":this.activeAssociationsInput?.associatedLayer?"viewing-associated-features":this.activeAssociationsInput?"viewing-associated-layers":this.activeRelationshipInput?.showAllRelatedRecords?"viewing-related-records":this.activeRelationshipInput?.showAllCategories?"viewing-related-categories":"default"}get status(){const t=this._prepareTask;return null==t?"not-loaded":t.finished?null!=t.error?"failed":"loaded":"loading"}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(t=>t.valid)}get layers(){const t=new Set;return this.features.forEach(e=>{const s=w(e);s&&t.add(s)}),Array.from(t)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){if(this.submitHasBeenAttempted=!0,this.validateContingentValues(this._workingFeatures),!this._hasPendingAttachmentHydration)return this._emitSubmit(),Promise.resolve();if(this._submitTask)return this._submitTask.promise;const t=s(async()=>{await Promise.all(this._allAttachmentInputs.map(t=>t.waitForPendingAttachmentUpdateData())),this._emitSubmit()});return this._submitTask=t,t.promise.finally(()=>{this._submitTask===t&&(this._submitTask=null)}),t.promise}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(t){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachment",t),null!=t&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(t){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachmentAddElementId",t),null!=t&&(this.selectedAttachment=null,this.selectedAttachmentListElementId=null)}get selectedAttachmentListElementId(){return this._get("selectedAttachmentListElementId")??null}set selectedAttachmentListElementId(t){this._set("selectedAttachmentListElementId",t),null!=t&&(this.selectedAttachment=null,this.selectedAttachmentAddElementId=null)}get selectedAttachmentListInput(){const t=this.selectedAttachmentListElementId,e=this.activeForm;return t&&e&&e.allAttachmentElementInputs.find(e=>e.template.elementId===t)||null}get showingSelectedAttachmentReplacePage(){return this._get("showingSelectedAttachmentReplacePage")??!1}set showingSelectedAttachmentReplacePage(t){this._set("showingSelectedAttachmentReplacePage",t&&null!=this.selectedAttachmentDetails)}get selectedAttachmentAddInput(){const t=this.selectedAttachmentAddElementId,e=this.activeForm;return t&&e&&e.allAttachmentElementInputs.find(e=>e.template.elementId===t)||null}get selectedAttachmentDetails(){const t=this.selectedAttachment,e=this.activeForm;if(!t||!e)return null;const s=e.allAttachmentElementInputs.find(e=>e.template.elementId===t.elementId);if(!s)return null;const i=s.attachments.findIndex(e=>C(e)===t.attachmentKey);if(-1===i)return null;return{attachment:s.attachments[i],input:s}}get _allAttachmentInputs(){const t=[...this.sharedForm.allAttachmentElementInputs];for(const e of this._featureFormMap.values())t.push(...e.allAttachmentElementInputs);return t}get _hasPendingAttachmentHydration(){return this._allAttachmentInputs.some(t=>t.hasPendingAttachmentUpdateData)}findFieldInput(t){if(null==t)return;const e=this._activeFormInputsByElementId;if(e.has(t))return e.get(t);const s=this.activeForm.allFieldInputs.find(e=>e.template.elementId===t);return void 0!==s?(e.set(t,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const t of this.visibleInputs){if(G(t)){const e=t.inputs.find(t=>D(t)&&!t.valid);if(e)return{input:e,groupInput:t}}if(D(t)&&!t.valid)return{input:t}}}getFieldInputValue(t){return this.findFieldInput(t)?.value}getValues(t){const e=this._reactiveGraphicLookup.get(t);if(!e)throw new a("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...e.attributes}}async goBack(){switch(this.page){case"replacing-attachment":return void this.setShowingSelectedAttachmentReplacePage(!1);case"viewing-attachment-details":return void this.setSelectedAttachment(null);case"adding-attachments":return void this.setSelectedAttachmentAddElementId(null);case"viewing-attachments":return void this.setSelectedAttachmentListElementId(null);case"viewing-associated-features":return void this.setActiveAssociationsLayer(null);case"viewing-associated-layers":return void this.setActiveAssociationsInput(null);case"viewing-related-categories":case"viewing-related-records":return void this.clearActiveRelationshipCategoryOrInput();default:return}}async goHome(){this.setShowingSelectedAttachmentReplacePage(!1),this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null),this.setSelectedAttachmentListElementId(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.clearAllRelationshipSettings()}notifyGeometriesChanged(t){const e=[];for(const s of t){const t=this._reactiveGraphicLookup.get(s);t&&(e.push(t),t.geometry=s.geometry)}this._updatingHandles.consumePromise(this._valueChangeTransaction(async t=>this._expressionsManager.runGeometryDependentExpressions(e,t),"user"))}async overrideOriginalFeature(t,e){await(this._prepareTask?.promise);const s=this._reactiveGraphicLookup.get(t);s&&(s.original=e,this._updatingHandles.consumePromise(this._valueChangeTransaction(t=>this._expressionsManager.runOriginalFeatureDependentExpressions(s,t),"expression")))}async setFieldInputValue(t,e){const{fieldName:s}=t;await this._updatingHandles.addPromise(this._valueChangeTransaction(async i=>{for(const a of t.features)i.setValue(a,s,e)},"user",t))}async setFieldInputValuePerFeature(t,e){await this._updatingHandles.addPromise(this._valueChangeTransaction(async s=>{for(const[i,a]of e)s.setValue(i,t.fieldName,a);s.hasChanges&&(t.userHasChangedValue=!0)},"user",t))}async setValueForFieldName(t,e,s){await this._updatingHandles.addPromise(this._valueChangeTransaction(async i=>{for(const a of s){const s=this._reactiveGraphicLookup.get(a);s&&i.setValue(s,t,e)}},"user",t))}async setValuePerFeatureForFieldName(t,e){await this._updatingHandles.addPromise(this._valueChangeTransaction(async s=>{for(const[i,a]of e){const e=this._reactiveGraphicLookup.get(i);e&&s.setValue(e,t,a)}},"user",t))}async setFieldValue(t,e){const s=this.activeForm.allFieldInputs.find(e=>e.fieldName===t);if(null==s)throw new a("no-field-input-found",`Cannot set the value of FieldInput with field name: ${t} because none was found in the active form`);await this.setFieldInputValue(s,e)}async setValue(t,e){const s=this.findFieldInput(t);if(null==s)throw new a("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${t} because none was found in the active form`);await this.setFieldInputValue(s,e)}async stageAddAttachments(t,e){if(0===e.length)return[];const s=this._findAttachmentInput(t);if(!s)return[];const i=await s.stageAddAttachments(e,this._expressionsManager.arcadeContext);return 0===i.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),i}stageDeleteAttachment(t,e){const s=this._findAttachmentInput(t);if(!s)return;const i=this._findAttachment(s,e);i&&(s.stageDeleteAttachment(i),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}async stageRenameAttachment(t,e,s){const i=this._findAttachmentInput(t);if(!i)return;const a=this._findAttachment(i,e);a&&0!==s.trim().length&&(i.stageRenameAttachment(a,s.trim()),this.userHasChangedValues=!0,await i.ensureStagedUpdateData(a),this._emitAttachmentsChange(i))}async stageReplaceAttachment(t,e,s){const i=this._findAttachmentInput(t);if(!i)return!1;const a=this._findAttachment(i,e);if(!a)return!1;return!!await i.stageReplaceAttachment(a,s,this._expressionsManager.arcadeContext)&&(this.userHasChangedValues=!0,this._emitAttachmentsChange(i),!0)}clearAttachmentChanges(t){const e=this._findAttachmentInput(t);e&&(e.clearAttachmentChanges(),this._emitAttachmentsChange(e))}setActiveAssociation(t){this._activeAssociation=t}setActiveAssociationsInput(t){this._activeAssociationsInput=t}setActiveAssociationsLayer(t){this._activeAssociationsInput?.setAssociatedLayer(t)}setActiveAssociationType(t){this._activeAssociationsInput?.setActiveAssociationType(t)}setActiveRelationshipInput(t){t||this._activeRelationshipInput?.setActiveCategory(null),this._activeRelationshipInput=t}setActiveRelationshipCategory(t,e){e.setActiveCategory(t),this.setActiveRelationshipInput(e)}clearAllRelationshipSettings(){const t=this.activeRelationshipInput;t&&(t.setActiveCategory(null),t.setShowAllCategories(!1),t.setShowAllRelatedRecords(!1),this._activeRelationshipInput=null)}clearActiveRelationshipCategoryOrInput(){const t=this.activeRelationshipInput;t&&(t.showAllRelatedRecords?t.showAllCategories?t.setActiveCategory(null):this.setActiveRelationshipInput(null):t.showAllCategories&&(t.setShowAllCategories(!1),this.setActiveRelationshipInput(null)))}resetAttachmentChanges(t,e){const s=this._findAttachmentInput(t);if(!s)return;const i=this._findAttachment(s,e);i&&(s.discardStagedEdits(i),this._emitAttachmentsChange(s))}setSelectedAttachment(t){this.selectedAttachment=t??null}setShowingSelectedAttachmentReplacePage(t){this.showingSelectedAttachmentReplacePage=t}setSelectedAttachmentAddElementId(t){this.selectedAttachmentAddElementId=t??null}setSelectedAttachmentListElementId(t){this.selectedAttachmentListElementId=t??null}userChangesHaveMadeFeatureInvalid(t){return!!this._reactiveGraphicLookup.get(t)?.userChangesHaveMadeInvalid}validate(){return!1}validateContingentValues(t,e=!1){if(e&&!this.submitHasBeenAttempted)for(const s of t)this._reactiveContingentValuesManager.validateContingenciesForNonNullFields(s);else for(const s of t)this._reactiveContingentValuesManager.validateContingencyConstraints(s,{includeIncompleteViolations:!0})}_makeBatchFormInputsForFeature(t){const e=this._layerTemplateMap.get(t.layer);return e?O(e,{allFeatures:new i([t]),expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}):this._emptyForm}_computeFormHeaderField(t){const{activeFeature:e,activeLayer:s}=this;return t&&s&&e?L({attributes:e?.attributes,label:t,layer:s,timeZone:this.effectiveTimeZone}):null}_makeSubmitResults(){const t=new Map;for(const[s,i]of this._reactiveGraphicLookup){const a=[],n=[],r=this._featureFormMap.get(i)?.allAttachmentElementInputs??[];for(const t of r)e(a,t.toSubmitEdits()),t.valid||n.push(t.template.elementId);t.set(s,{feature:s,values:{...i.attributes},invalidFields:[],attachmentEdits:a,invalidAttachmentElementIds:n})}for(const e of this.sharedForm.allFieldInputs)for(const s of e.invalidFeatures)t.get(s)?.invalidFields.push(e.fieldName);return Array.from(t.values())}_emitSubmit(){this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}_findAttachmentInput(t){const e=this.activeForm.allAttachmentElementInputs.find(e=>e.template.elementId===t);return e||r.getLogger(this).error(`Attachment input not found for elementId '${t}'`),e}_findAttachment(t,e){const s=t.findAttachment(e);return s||r.getLogger(this).error(`Attachment '${e}' not found for attachment element '${t.template.elementId}'`),s}_makeAttachmentEdits(t){const s=[];for(const i of t.allAttachmentElementInputs)e(s,i.toSubmitEdits());return s}_emitAttachmentsChange(t){const e=t.single.feature;if(!e)return;const s=this._featureFormMap.get(e);this.emit("attachments-change",{name:"attachments-change",feature:e.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}async _valueChangeTransaction(t,e,s){const i=new S(this,e,"string"==typeof s?s:s?.fieldName);if(await t(i),"user"===e&&await this._expressionsManager.runExpressionsDependentOnChangedFields(i),await i.close(),i.hasChanges&&s){const t="string"==typeof s?this.activeForm.allFieldInputs.find(t=>t.fieldName===s):s;t&&(t.userHasChangedValue=!0)}}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=c(this._prepareTask),l(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new P({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??I.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{attachmentsEnabled:t,layers:e}=this;if(0===e.length)return;const i=s(async s=>{try{h(s),this._updateWorkingFeatures(),this.contingentValuesManager.layers.addMany(e);const i=new Map;await Promise.all(e.map(t=>t.load()));for(const a of e){const e=K(this.layerInfos,a),n=await N(a,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone,attachmentsEnabled:t},e?.formTemplate);h(s),this._layerTemplateMap.set(a,n);const r=n.getExpressionExecutorsForLayer(a);if(this._expressionsManager.layerExpressionsModelMap.set(a,new j({preserveFieldValuesWhenHidden:n.preserveFieldValuesWhenHidden,executorMap:r})),!this._hasAsyncArcadeExpressions)for(const t of r.keys()){const e=r.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of n.elements){if(Z(t))continue;const e=t.clone();W(e)&&(e.elements=e.elements.filter(t=>!Z(t)));const{elementId:s}=e;i.has(s)?i.get(s).foldIn(e):i.set(s,e)}}if(this.hasTooManyComplexFeatures)throw new a("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new a("too-many-features","There are too many features to load into the form.");const n=new U({elements:Array.from(i.values())});this.sharedFormTemplate=n,this.sharedForm=O(n,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),await this._valueChangeTransaction(async t=>await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray(),t),"expression"),await A(()=>!this.contingentValuesManager.updating)}catch(i){throw u(i)||r.getLogger(this).error("Failed preparing form",i),i}});this._updatingHandles.consumePromise(i.promise),this._prepareTask=i}_updateWorkingFeatures(){this._workingFeatures.destroyAll(),this._reactiveContingentValuesManager.reset();for(const e of this._featureFormMap.values())e.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:t}=this;if(this._reactiveGraphicLookup=new p,0!==t.length){this._workingFeatures.addMany(t.map(b));for(const t of this._workingFeatures)this._reactiveGraphicLookup.set(t.source,t)}}async _syncAttachments(){const{activeFeature:t,activeLayer:e,activeForm:s}=this;if(!(t&&s&&V(e)&&k(e)))return;const i=t.getObjectId();if(null==i)return;const a=this._attachmentCache.get(e),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(a){const t=a.get(i);t&&(r=t)}if(!r){r=await T(e,i,n);o(this._attachmentCache,e,()=>new p).set(i,r)}for(const o of n)o.applyFetchedAttachments(Y(o,r))}get test(){return{expressionsManager:this._expressionsManager,reactiveGraphicLookup:this._reactiveGraphicLookup}}};t([y()],q.prototype,"_attachmentCache",void 0),t([y({readOnly:!0})],q.prototype,"activeFeature",null),t([y()],q.prototype,"activeFeatureIndex",void 0),t([y({readOnly:!0})],q.prototype,"activeForm",null),t([y({readOnly:!0})],q.prototype,"activeLayer",null),t([y()],q.prototype,"activeAssociation",null),t([y()],q.prototype,"activeAssociationsInput",null),t([y()],q.prototype,"activeAssociationType",null),t([y()],q.prototype,"activeRelationshipInput",null),t([y()],q.prototype,"attachmentsEnabled",void 0),t([y()],q.prototype,"callbacks",void 0),t([y()],q.prototype,"disabled",void 0),t([y()],q.prototype,"calculating",null),t([y()],q.prototype,"canGoBack",null),t([y()],q.prototype,"contingentValuesManager",void 0),t([y()],q.prototype,"editType",void 0),t([y()],q.prototype,"features",void 0),t([y()],q.prototype,"expressionEvaluationFailed",null),t([y()],q.prototype,"hasNonActiveInvalidFeatures",null),t([y()],q.prototype,"hasAsyncArcadeExpressions",null),t([y()],q.prototype,"_hasAsyncArcadeExpressions",void 0),t([y()],q.prototype,"invalidFeatures",null),t([y()],q.prototype,"hasVisibleInputs",null),t([y()],q.prototype,"hasLayersWithContingentValues",null),t([y()],q.prototype,"formDescription",null),t([y()],q.prototype,"formTitle",null),t([y()],q.prototype,"effectiveTimeZone",null),t([y()],q.prototype,"highlightHelper",void 0),t([y()],q.prototype,"maximumFeatureCount",void 0),t([y()],q.prototype,"maximumFeatureCountWithComplexForms",void 0),t([y()],q.prototype,"visibleInputs",null),t([y()],q.prototype,"map",void 0),t([y()],q.prototype,"noVisibleElementsReason",null),t([y()],q.prototype,"page",null),t([y()],q.prototype,"pageStack",void 0),t([y()],q.prototype,"readOnly",void 0),t([y()],q.prototype,"spatialReference",void 0),t([y()],q.prototype,"submitHasBeenAttempted",void 0),t([y()],q.prototype,"timeZone",void 0),t([y()],q.prototype,"updating",null),t([y()],q.prototype,"valid",null),t([y()],q.prototype,"layers",null),t([y()],q.prototype,"mode",null),t([y()],q.prototype,"sharedForm",void 0),t([y()],q.prototype,"sharedFormTemplate",void 0),t([y()],q.prototype,"selectedAttachment",null),t([y()],q.prototype,"selectedAttachmentAddElementId",null),t([y()],q.prototype,"selectedAttachmentListElementId",null),t([y()],q.prototype,"selectedAttachmentListInput",null),t([y()],q.prototype,"showingSelectedAttachmentReplacePage",null),t([y()],q.prototype,"selectedAttachmentAddInput",null),t([y()],q.prototype,"selectedAttachmentDetails",null),t([y()],q.prototype,"userHasChangedValues",void 0),t([y()],q.prototype,"layerInfos",void 0),t([y()],q.prototype,"_arcadeExecutorProvider",void 0),t([y()],q.prototype,"_activeAssociation",void 0),t([y()],q.prototype,"_activeAssociationsInput",void 0),t([y()],q.prototype,"_activeRelationshipInput",void 0),t([y()],q.prototype,"_prepareTask",void 0),t([y()],q.prototype,"_reactiveGraphicLookup",void 0),t([y()],q.prototype,"_allAttachmentInputs",null),t([y()],q.prototype,"_hasPendingAttachmentHydration",null),t([y()],q.prototype,"_layerTemplateMap",void 0),t([y()],q.prototype,"_workingFeatures",void 0),t([y()],q.prototype,"_expressionsManager",void 0),q=t([_("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],q);const J=q;function Q(t){return null!=t&&t.trim().length>0}function X(t,e){const s=t.keywords;return Q(s)&&s.toLowerCase()===e}function Y(t,e){const s="attachment"===t.input?.type?t.input.attachmentAssociationType:"exact",i=t.attachmentKeyword;if("any"===s)return e;if("exactOrNone"===s){if(z(i))return e.filter(t=>!Q(t.keywords));const t=i.toLowerCase();return e.filter(e=>!Q(e.keywords)||X(e,t))}if(z(i))return e;const a=i.toLowerCase();return e.filter(t=>X(t,a))}export{J as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{createObservableProxy as r}from"../../core/proxy.js";import s from"../../core/ReactiveMap.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{valuesAreEquivalent as a}from"../support/forms/formUtils.js";let u=class extends e{constructor(t){super(t),this._stashedAttributes=new s,this.userChangesHaveMadeInvalid=!1,this.original=t.source.clone();const e=t.source.attributes??{},i=r({...e});this.attributes=i;const o=t.source.cloneShallow();o.attributes=i,this.plainGraphic=o}get geometry(){return this.plainGraphic.geometry}set geometry(t){this.plainGraphic.geometry=t}get layer(){return this.source.sourceLayer??this.source.layer}attributeHasChanged(t){return!a(this.attributes[t],this.original.attributes?.[t])}getAttribute(t){return this.attributes[t]??null}getObjectId(){return this.plainGraphic.getObjectId()}getGlobalId(){return this.plainGraphic.getGlobalId()}getStashedAttribute(t){return this._stashedAttributes.get(t)}setAttribute(t,e){this.attributes[t]=e}stashAttribute(t,e){this._stashedAttributes.set(t,e)}clearStashedAttributes(){this._stashedAttributes.clear()}};t([i()],u.prototype,"attributes",void 0),t([i()],u.prototype,"geometry",null),t([i()],u.prototype,"plainGraphic",void 0),t([i()],u.prototype,"layer",null),t([i(
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{createObservableProxy as r}from"../../core/proxy.js";import s from"../../core/ReactiveMap.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{valuesAreEquivalent as a}from"../support/forms/formUtils.js";let u=class extends e{constructor(t){super(t),this._stashedAttributes=new s,this.userChangesHaveMadeInvalid=!1,this.original=t.source.clone();const e=t.source.attributes??{},i=r({...e});this.attributes=i;const o=t.source.cloneShallow();o.attributes=i,this.plainGraphic=o}get geometry(){return this.plainGraphic.geometry}set geometry(t){this.plainGraphic.geometry=t}get layer(){return this.source.sourceLayer??this.source.layer}attributeHasChanged(t){return!a(this.attributes[t],this.original.attributes?.[t])}getAttribute(t){return this.attributes[t]??null}getObjectId(){return this.plainGraphic.getObjectId()}getGlobalId(){return this.plainGraphic.getGlobalId()}getStashedAttribute(t){return this._stashedAttributes.get(t)}setAttribute(t,e){this.attributes[t]=e}stashAttribute(t,e){this._stashedAttributes.set(t,e)}clearStashedAttributes(){this._stashedAttributes.clear()}};t([i()],u.prototype,"attributes",void 0),t([i()],u.prototype,"geometry",null),t([i()],u.prototype,"plainGraphic",void 0),t([i()],u.prototype,"layer",null),t([i()],u.prototype,"original",void 0),t([i({constructOnly:!0})],u.prototype,"source",void 0),t([i()],u.prototype,"userChangesHaveMadeInvalid",void 0),u=t([o("esri.widgets.BatchAttributeForm.ReactiveGraphic")],u);export{u as ReactiveGraphic};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"../../core/Error.js";import{getOrCreateMapValue as t}from"../../core/MapUtils.js";class s{constructor(e,t,s){this.changes=new Map,this.isOpen=!0,this.priorInvalidFeatures=new Set,this.viewModel=e,this.originActor=t,this.originField=s,this.priorInvalidFeatures=new Set(e.invalidFeatures)}get hasChanges(){return this.changes.size>0}async close(){if(this._assertIsOpen(),this.isOpen=!1,0!==this.changes.size){"single"!==this.viewModel.mode&&1!==this.viewModel.features.length||this.viewModel.validateContingentValues(this.changes.keys(),!0),this._reconcileValidityTracking(),this.viewModel.emit("values-change",this._makeEventPayload());for(const e of this._makeDeprecatedEventPayloads())this.viewModel.emit("value-change",e)}}setValue(e,s,i){if(this._assertIsOpen(),e.getAttribute(s)===i)return;e.setAttribute(s,i);t(this.changes,e,()=>new Map).set(s,i)}_assertIsOpen(){if(!this.isOpen)throw new e("batch-attribute-form:transaction-closed","Operation cannot be performed on a closed transaction.")}_makeEventPayload(){return{data:Array.from(this.changes.entries()).map(([e,t])=>({feature:e.source,changes:Array.from(t.entries()).map(([e,t])=>({fieldName:e,value:t}))})),fieldName:this.originField,name:"values-change",source:this.originActor}}_makeDeprecatedEventPayloads(){const e=this.originField;if(!e)return[];const s=new Map;for(const i of this.changes.keys()){t(s,i.getAttribute(e),()=>[]).push(i.source)}return Array.from(s.entries()).map(([t,s])=>({features:s,fieldName:e,name:"value-change",value:t}))}_reconcileValidityTracking(){if("expression"===this.originActor)return;const e=new Set(this.viewModel.invalidFeatures);for(const t of this.changes.keys()){const s=t.source,i=this.priorInvalidFeatures.has(s),a=e.has(s);i!==a&&(t.userChangesHaveMadeInvalid=a)}}}export{s as ValueChangeTransaction};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Accessor from "../../core/Accessor.js";
|
|
2
2
|
|
|
3
3
|
/** @since 5.0 */
|
|
4
|
-
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "errorsForNonVisibleFields">> {}
|
|
4
|
+
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "errorsForNonVisibleFields" | "readOnlyNotice">> {}
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* An object containing properties that control the visibility of certain elements within the [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/) widget.
|
|
@@ -17,4 +17,11 @@ export default class VisibleElements extends Accessor {
|
|
|
17
17
|
* @since 5.0
|
|
18
18
|
*/
|
|
19
19
|
accessor errorsForNonVisibleFields: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Default value is `true`. Indicates whether to display the read-only notice for the form.
|
|
22
|
+
*
|
|
23
|
+
* @default true
|
|
24
|
+
* @since 5.1
|
|
25
|
+
*/
|
|
26
|
+
accessor readOnlyNotice: boolean;
|
|
20
27
|
}
|