@arcgis/core 5.2.0-next.21 → 5.2.0-next.23
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/Graphic.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js → 1040bce57ea63a6dbca4.js} +2 -2
- package/assets/esri/core/workers/chunks/1a7c0a1dc6ecc93ea03a.js +1 -0
- package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +1 -0
- package/assets/esri/core/workers/chunks/2d6d01913096f7cb5ff8.js +1 -0
- package/assets/esri/core/workers/chunks/30298f84bd414f9dea64.js +1 -0
- package/assets/esri/core/workers/chunks/353c67da4b25c29360db.js +2 -0
- package/assets/esri/core/workers/chunks/3b4fc67f6cb7393fbd97.js +1 -0
- package/assets/esri/core/workers/chunks/47948c72bc01bd173c20.js +2 -0
- package/assets/esri/core/workers/chunks/{f0519b06987471456b69.js → 502464c4eab7667f6566.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7acbc2ddff4cee8a465.js → 5ee887fc6e1e0e70e02f.js} +1 -1
- package/assets/esri/core/workers/chunks/6c0c77de1934f35dc45f.js +1 -0
- package/assets/esri/core/workers/chunks/{f7f820483e45c05ab9e4.js → 75df436e6e9773bdcfc2.js} +1 -1
- package/assets/esri/core/workers/chunks/780519b60aa674a61a74.js +1 -0
- package/assets/esri/core/workers/chunks/7dbaa089c7472825b80c.js +1 -0
- package/assets/esri/core/workers/chunks/7dec8c453fdee1968d12.js +1 -0
- package/assets/esri/core/workers/chunks/{a2247f4c3116efb16c4f.js → 7e23de8d9b2d938808f6.js} +1 -1
- package/assets/esri/core/workers/chunks/7e4093f42795ba2f8cfd.js +1 -0
- package/assets/esri/core/workers/chunks/{6649acaceab00ad30e7f.js → 8ba3e0462a9bdaae5f40.js} +1 -1
- package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +1 -0
- package/assets/esri/core/workers/chunks/9434c76ad39c936dba90.js +1 -0
- package/assets/esri/core/workers/chunks/{909e67dee8c30e391d69.js → a8310f55de4749f973d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac16016964be3b684e98.js → aded4e704e09a28edc8f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7175f0c6a6e56b685d20.js → b419fd36337e76e2d4a3.js} +6 -6
- package/assets/esri/core/workers/chunks/{05d597dd117766beadd8.js → b91a15522692781560b4.js} +1 -1
- package/assets/esri/core/workers/chunks/c86d388d216adbb15a05.js +1 -0
- package/assets/esri/core/workers/chunks/{f1ff33584680d8718400.js → c9ce408675dae6a0edd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b522e05668bef729b1b.js → ceb5bd9f2afaa2ea0808.js} +1 -1
- package/assets/esri/core/workers/chunks/d07068c44d560e4ce02e.js +1 -0
- package/assets/esri/core/workers/chunks/{da47fdffb5969694a2ae.js → d41eed41916ed0422059.js} +1 -1
- package/assets/esri/core/workers/chunks/{19493c9c7e1d2ac0f80f.js → d4e0346209fabc58f929.js} +1 -1
- package/assets/esri/core/workers/chunks/{b375abfb2a2d9c63e20a.js → db90fb8ac96579259566.js} +1 -1
- package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js → dd0acd0f8b96839b4f24.js} +2 -2
- package/assets/esri/core/workers/chunks/{5809e70a8e57e9b05959.js → dd795c95cdc3812b5b49.js} +1 -1
- package/assets/esri/core/workers/chunks/f7344d855f1092383abe.js +1 -0
- package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js → f859c53432f258af77e3.js} +2 -2
- package/assets/esri/core/workers/chunks/{ecbf84a1f42e6188faab.js → fd629872b5c07853f695.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.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/chunks/GaussianSplat.glsl.js +4 -4
- package/chunks/GaussianSplatShadow.glsl.js +1 -1
- package/config.d.ts +9 -2
- package/config.js +1 -1
- package/core/date.js +1 -1
- package/form/FormTemplate.d.ts +15 -20
- package/form/elements/AttachmentElement.d.ts +38 -11
- package/form/elements/Element.d.ts +9 -6
- package/form/elements/FieldElement.d.ts +0 -1
- package/form/elements/GroupElement.d.ts +4 -6
- package/form/elements/RelationshipElement.d.ts +8 -8
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +34 -18
- package/form/elements/inputs/attachments/AudioInput.d.ts +4 -3
- package/form/elements/inputs/attachments/DocumentInput.d.ts +2 -6
- package/form/elements/inputs/attachments/ImageInput.d.ts +4 -3
- package/form/elements/inputs/attachments/Input.d.ts +6 -3
- package/form/elements/inputs/attachments/SignatureInput.d.ts +3 -3
- package/form/elements/inputs/attachments/VideoInput.d.ts +4 -3
- package/form/elements.d.ts +6 -12
- package/form/types.d.ts +0 -4
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -1
- package/layers/DimensionFeatureLayer.d.ts +2 -1
- package/layers/OrientedImageryLayer.d.ts +20 -2
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/fileProviderChangedError.js +2 -0
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/types.d.ts +4 -1
- package/layers/support/RasterBandInfo.js +1 -1
- package/layers/types.d.ts +1 -0
- package/package.json +3 -3
- package/rest/support/AttachmentQuery.d.ts +13 -1
- package/rest/support/AttachmentQuery.js +1 -1
- package/rest/support/OutDistance.d.ts +5 -1
- package/rest/support/PrintParameters.d.ts +2 -1
- package/rest/support/Query.d.ts +2 -0
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/SimpleMarkerSymbol.d.ts +2 -2
- package/views/2d/engine/AFeatureContainer.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatHeaderTexture.js +2 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +13 -12
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/PopupView.d.ts +3 -0
- package/views/View2D.d.ts +2 -2
- package/views/layers/AnnotationFeatureLayerView.d.ts +9 -1
- package/views/layers/DimensionFeatureLayerView.d.ts +9 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +0 -7
- package/widgets/BatchAttributeForm.d.ts +7 -9
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +12 -2
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/compatibilityAdapters.js +2 -0
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/legacy/AddAssociationWorkflow.js +2 -0
- package/widgets/Editor/legacy/AddAssociationWorkflowData.js +2 -0
- package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +2 -0
- package/widgets/Editor/legacy/CreateFeaturesWorkflowData.js +2 -0
- package/widgets/Editor/legacy/MergeFeaturesWorkflow.js +2 -0
- package/widgets/Editor/legacy/MergeFeaturesWorkflowData.js +2 -0
- package/widgets/Editor/legacy/SplitFeatureWorkflow.js +2 -0
- package/widgets/Editor/legacy/SplitFeatureWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateFeatureWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateFeaturesWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateFeaturesWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateRecordWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateRecordWorkflowData.js +2 -0
- package/widgets/Editor/legacy/UpdateWorkflow.js +2 -0
- package/widgets/Editor/legacy/UpdateWorkflowData.js +2 -0
- package/widgets/Editor/legacy/Workflow.js +2 -0
- package/widgets/Editor/legacy/workflowUtils.js +2 -0
- package/widgets/Editor/types.d.ts +12 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +16 -12
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.d.ts +14 -16
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +2 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.d.ts +3 -0
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/types.d.ts +20 -0
- package/widgets/FeatureTable.d.ts +14 -2
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/057d288d795b853295f1.js +0 -2
- package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +0 -1
- package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +0 -1
- package/assets/esri/core/workers/chunks/33866e6e6de1bab64599.js +0 -1
- package/assets/esri/core/workers/chunks/360fd810d70d21c092d9.js +0 -1
- package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +0 -1
- package/assets/esri/core/workers/chunks/5aa375b0c6a205134703.js +0 -1
- package/assets/esri/core/workers/chunks/5f0bc019add4aff3130c.js +0 -1
- package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +0 -1
- package/assets/esri/core/workers/chunks/754f7ed62afc4e0a1972.js +0 -2
- package/assets/esri/core/workers/chunks/7ee76504e7fea389a1c9.js +0 -1
- package/assets/esri/core/workers/chunks/8331e04ebe0a54b04ab6.js +0 -1
- package/assets/esri/core/workers/chunks/8c64c6b8d7376a9d1c91.js +0 -1
- package/assets/esri/core/workers/chunks/c30ca771dd3f7198142b.js +0 -1
- package/assets/esri/core/workers/chunks/e5fcd8e7a4a660ef6ad6.js +0 -1
- package/assets/esri/core/workers/chunks/f47319d36f1527277923.js +0 -1
- package/assets/esri/core/workers/chunks/ff00ac01f0baaecaa890.js +0 -1
- /package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js.LICENSE.txt → 1040bce57ea63a6dbca4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{057d288d795b853295f1.js.LICENSE.txt → 353c67da4b25c29360db.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js.LICENSE.txt → 47948c72bc01bd173c20.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{754f7ed62afc4e0a1972.js.LICENSE.txt → dd0acd0f8b96839b4f24.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js.LICENSE.txt → f859c53432f258af77e3.js.LICENSE.txt} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as o,addLightingGlobalFactor as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ReadShadowMapPassFragment as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{GaussianSplatCovariance as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as m,GaussianSplatUnpacking as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{RgbNormalizedDepthEncoding as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as P,If as C}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as M}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as R}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as j}from"../views/webgl/ShaderBuilder.js";class L extends m{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.focalLength=-1,this.minSplatRadius=-1,this.tanFov=a(),this.origin=i()}}function F(a){const{clippingEnabled:i,hasSlicePlane:m,receiveShadows:L,spherical:F}=a,D=new j;D.varyings.add("vColor","vec4"),D.varyings.add("conicOpacity","vec4"),D.varyings.add("gaussianLogAlphaCutoff","float"),D.varyings.add("offsetFromCenter","vec2"),G(a)&&D.varyings.add("fragmentPositionCameraRelative","vec3"),D.vertex.uniforms.add(new M("splatOrderTexture",e=>e.splatOrder),new M("splatFadingTexture",e=>e.splatFading),new M("splatAtlasTexture",e=>e.splatAtlas),new y("focalLength",e=>e.focalLength),new y("minSplatRadius",e=>e.minSplatRadius),new w("tanFov",e=>e.tanFov),new h("inverseScreenSize",({camera:a})=>e(z,1/a.fullWidth,1/a.fullHeight)),new S("proj",e=>e.camera.projectionMatrix),new S("view",e=>e.camera.viewMatrix),new h("nearFar",e=>e.camera.nearFar),new x("cameraPosition",e=>e.camera.eye)),i&&(D.vertex.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative)),D.fragment.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative))),D.vertex.include(u),D.vertex.include(p),D.vertex.include(f),D.vertex.include(d),D.vertex.include(g),D.vertex.include(n,a),L?(D.fragment.uniforms.add(new x("cameraPosition",e=>e.camera.eye)),D.fragment.include(t,a)):D.vertex.include(t,a),D.include(s,a),o(L?D.fragment:D.vertex),r(L?D.fragment:D.vertex),L&&D.include(c,a),D.outputs.add("fragColor","vec4",0),D.outputs.add("fragDepthColor","vec4",1);const A=R(a.alphaCutoff),
|
|
2
|
+
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as o,addLightingGlobalFactor as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ReadShadowMapPassFragment as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{GaussianSplatCovariance as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as m,GaussianSplatUnpacking as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{RgbNormalizedDepthEncoding as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as P,If as C}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as M}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as R}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as j}from"../views/webgl/ShaderBuilder.js";class L extends m{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.focalLength=-1,this.minSplatRadius=-1,this.tanFov=a(),this.origin=i()}}function F(a){const{clippingEnabled:i,hasSlicePlane:m,receiveShadows:L,spherical:F}=a,D=new j;D.varyings.add("vColor","vec4"),D.varyings.add("conicOpacity","vec4"),D.varyings.add("gaussianLogAlphaCutoff","float"),D.varyings.add("offsetFromCenter","vec2"),G(a)&&D.varyings.add("fragmentPositionCameraRelative","vec3"),D.vertex.uniforms.add(new M("splatOrderTexture",e=>e.splatOrder),new M("splatFadingTexture",e=>e.splatFading),new M("splatAtlasTexture",e=>e.splatAtlas),new M("splatHeaderTexture",e=>e.splatHeader),new y("focalLength",e=>e.focalLength),new y("minSplatRadius",e=>e.minSplatRadius),new w("tanFov",e=>e.tanFov),new h("inverseScreenSize",({camera:a})=>e(z,1/a.fullWidth,1/a.fullHeight)),new S("proj",e=>e.camera.projectionMatrix),new S("view",e=>e.camera.viewMatrix),new h("nearFar",e=>e.camera.nearFar),new x("cameraPosition",e=>e.camera.eye)),i&&(D.vertex.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative)),D.fragment.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative))),D.vertex.include(u),D.vertex.include(p),D.vertex.include(f),D.vertex.include(d),D.vertex.include(g),D.vertex.include(n,a),L?(D.fragment.uniforms.add(new x("cameraPosition",e=>e.camera.eye)),D.fragment.include(t,a)):D.vertex.include(t,a),D.include(s,a),o(L?D.fragment:D.vertex),r(L?D.fragment:D.vertex),L&&D.include(c,a),D.outputs.add("fragColor","vec4",0),D.outputs.add("fragDepthColor","vec4",1);const A=R(a.alphaCutoff),T=Math.log(A),B=P`float groundLightAlignment = dot(groundNormal, mainLightDirection);
|
|
3
3
|
float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);
|
|
4
4
|
vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,$=P`
|
|
5
5
|
vec3 groundNormal = ${F?P`normalize(cameraRelativePosition + cameraPosition)`:P`vec3(0.0, 0.0, 1.0)`};
|
|
6
|
-
${
|
|
6
|
+
${B}
|
|
7
7
|
float shadow = ${F?P`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:P`0.0`};
|
|
8
8
|
vColor.rgb = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
|
|
9
9
|
`,E=P`
|
|
10
10
|
vec3 groundNormal = ${F?P`normalize(fragmentPositionCameraRelative + cameraPosition)`:P`vec3(0.0, 0.0, 1.0)`};
|
|
11
|
-
${
|
|
11
|
+
${B}
|
|
12
12
|
float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);
|
|
13
13
|
shadedColor = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
|
|
14
|
-
`;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${C(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${l};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${C(i,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${C(m,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${
|
|
14
|
+
`;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${C(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${l};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${C(i,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${C(m,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${T} - log(vColor.a);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Ignore Gaussians with very small contribution, with tolerance based on the quality profile.\n if (rejectGaussianByMinimumRadius(maxRadius, vColor.a, minSplatRadius)) {\n return;\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n // Cull splats whose screen-space ellipse cannot touch the viewport.\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n\n ${C(G(a),"float viewSpacePixelScale = -viewPos.z / focalLength;\n vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);\n fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;")}\n\n // Store conic coefficients with opacity for fragment-side falloff.\n vec3 conic = computeGaussianConic(covariance2D, determinant);\n conicOpacity = vec4(conic, vColor.a);\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${C(L,"forwardLinearDepth(-viewPos.z);",$)}\n\n // Place this quad corner in clip space around the projected splat center.\n vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n\n gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);\n\n `),D.fragment.include(v),D.fragment.include(g),D.fragment.include(n,a),D.fragment.main.add(`\n ${C(i,"if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||\n fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {\n discard;\n }")}\n ${C(m,"if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }")}\n\n float gaussianExponent = evaluateGaussianExponent(conicOpacity.xyz, offsetFromCenter);\n\n // A positive exponent indicates alpha > 1, which should not happen.\n // We also early check the opacity-aware alpha cutoff to avoid unnecessary exp().\n if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${C(L,E)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(0.25, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),D}function G(e){const{clippingEnabled:a,hasSlicePlane:i,receiveShadows:n}=e;return n||i||a}const z=a(),D=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatPassParameters:L,build:F},Symbol.toStringTag,{value:"Module"}));export{L as G,D as a,F as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{positionOutsideClipSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as t,GaussianSplatUnpacking as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float3PassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as m,If as f}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";class w extends t{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.minSplatRadius=-1}}function S(a){const{clippingEnabled:i,hasSlicePlane:t}=a,w=new h,{fragment:S,varyings:j,vertex:y}=w;j.add("conic","vec3"),j.add("gaussianLogAlphaCutoff","float"),j.add("offsetFromCenter","vec2"),y.uniforms.add(new g("splatOrderTexture",e=>e.splatOrder),new g("splatAtlasTexture",e=>e.splatAtlas),new u("minSplatRadius",e=>e.minSplatRadius),new d("inverseScreenSize",({camera:a})=>e(P,1/a.fullWidth,1/a.fullHeight)),new x("proj",e=>e.camera.projectionMatrix),new x("view",e=>e.camera.viewMatrix),new d("nearFar",e=>e.camera.nearFar)),i&&y.uniforms.add(new p("clipMin",e=>e.clipMinCameraRelative),new p("clipMax",e=>e.clipMaxCameraRelative)),y.include(l),y.include(s),y.include(v),y.include(o),y.include(c),y.include(n,a),y.code.add(m`float safeClipW(float clipW) {
|
|
2
|
+
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{positionOutsideClipSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as t,GaussianSplatUnpacking as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float3PassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as m,If as f}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";class w extends t{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.minSplatRadius=-1}}function S(a){const{clippingEnabled:i,hasSlicePlane:t}=a,w=new h,{fragment:S,varyings:j,vertex:y}=w;j.add("conic","vec3"),j.add("gaussianLogAlphaCutoff","float"),j.add("offsetFromCenter","vec2"),y.uniforms.add(new g("splatOrderTexture",e=>e.splatOrder),new g("splatAtlasTexture",e=>e.splatAtlas),new g("splatHeaderTexture",e=>e.splatHeader),new u("minSplatRadius",e=>e.minSplatRadius),new d("inverseScreenSize",({camera:a})=>e(P,1/a.fullWidth,1/a.fullHeight)),new x("proj",e=>e.camera.projectionMatrix),new x("view",e=>e.camera.viewMatrix),new d("nearFar",e=>e.camera.nearFar)),i&&y.uniforms.add(new p("clipMin",e=>e.clipMinCameraRelative),new p("clipMax",e=>e.clipMaxCameraRelative)),y.include(l),y.include(s),y.include(v),y.include(o),y.include(c),y.include(n,a),y.code.add(m`float safeClipW(float clipW) {
|
|
3
3
|
return abs(clipW) < 1e-7 ? (clipW < 0.0 ? -1e-7 : 1e-7) : clipW;
|
|
4
4
|
}`),y.code.add(m`vec3 computeProjectivePixelGradient(
|
|
5
5
|
vec3 clipGradient,
|
package/config.d.ts
CHANGED
|
@@ -81,8 +81,15 @@ export interface Config {
|
|
|
81
81
|
*/
|
|
82
82
|
apiKeys: ApiKeysConfig;
|
|
83
83
|
/**
|
|
84
|
-
* The name of the application using the
|
|
85
|
-
*
|
|
84
|
+
* The name of the application using the JS Maps SDK. This value is used for various purposes, including:
|
|
85
|
+
*
|
|
86
|
+
* - The [GetEnvironment](https://developers.arcgis.com/arcade/function-reference/debugging_functions/#getenvironment) function in Arcade expressions. Expression authors can return different content depending on the application or use it for debugging purposes.
|
|
87
|
+
* - Associating feedback submitted to the [ArcGIS Arcade assistant](https://developers.arcgis.com/javascript/latest/references/coding-components/components/arcgis-arcade-editor/#disableAssistant) in the Arcade editor with a specific application
|
|
88
|
+
* - Application developers can use this value to associate feedback submitted through the [ArcGIS Assistant component](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/#event-arcgisFeedback) to a specific agentic web mapping application. This can make it easier to understand usage patterns and troubleshoot feedback.
|
|
89
|
+
*
|
|
90
|
+
* Esri uses this value in ArcGIS applications such as Instant apps, Story Maps, Map Viewer, and others to identify which
|
|
91
|
+
* applications customers used to submit feedback to AI assistants. This helps understand the context of the feedback and
|
|
92
|
+
* troubleshoot issues. Any application developer can do the same for tracking their own feedback.
|
|
86
93
|
*
|
|
87
94
|
* @default ""
|
|
88
95
|
* @since 4.27
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.23";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/date.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
function e(e){return null
|
|
2
|
+
function e(e){return null!==n(e)}function n(e){return s(e)??t(e)??u(e)}function t(e){const n=new Date(e),t=n.getTime();return Number.isNaN(t)?null:e.toLowerCase()===n.toUTCString().toLowerCase()?t:null}function s(e){const n=o.exec(e);if(!n?.groups)return null;const t=n.groups,s=+t.year,u=+t.month-1,r=+t.day,i=+(t.hours??"0"),f=+(t.minutes??"0"),d=+(t.seconds??"0");if(i>23)return null;if(f>59)return null;if(d>59)return null;const l=t.ms??"0",c=l?+l.padEnd(3,"0").slice(0,3):0;let a;if(t.isUTC||!t.offsetSign)a=Date.UTC(s,u,r,i,f,d,c);else{const e=+t.offsetHours,n=+t.offsetMinutes;a=6e4*("+"===t.offsetSign?-1:1)*(60*e+n)+Date.UTC(s,u,r,i,f,d,c)}return Number.isNaN(a)?null:a}function u(e){if(!r.test(e))return null;const n=new Date(e);return Number.isNaN(n.getTime())?null:n.getTime()-6e4*n.getTimezoneOffset()}const o=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,r=/^((\d{1,2}\/\d{1,2}\/\d{4})|(\d{4}-\d{1,2}-\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i;export{e as isDateString,n as parseDate};
|
package/form/FormTemplate.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { TextElementProperties } from "./elements/TextElement.js";
|
|
|
13
13
|
import type { UtilityNetworkAssociationsElementProperties } from "./elements/UtilityNetworkAssociationsElement.js";
|
|
14
14
|
import type { ExpressionInfoProperties } from "./ExpressionInfo.js";
|
|
15
15
|
|
|
16
|
-
export interface FormTemplateProperties extends Partial<Pick<FormTemplate, "description" | "preserveFieldValuesWhenHidden" | "title">> {
|
|
16
|
+
export interface FormTemplateProperties extends Partial<Pick<FormTemplate, "description" | "preserveFieldValuesWhenHidden" | "supportsAttachmentElements" | "title">> {
|
|
17
17
|
/**
|
|
18
18
|
* An array of [form element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/Element/)
|
|
19
19
|
* objects that represent an ordered list of form elements.
|
|
@@ -24,8 +24,8 @@ export interface FormTemplateProperties extends Partial<Pick<FormTemplate, "desc
|
|
|
24
24
|
* > [!WARNING]
|
|
25
25
|
* >
|
|
26
26
|
* > * Nested group elements are not supported.
|
|
27
|
-
* > * The `AttachmentElement` is not yet fully supported by the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) widget. Support will be added in a future release.
|
|
28
27
|
*
|
|
28
|
+
* @see [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/)
|
|
29
29
|
* @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
|
|
30
30
|
* @see [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/)
|
|
31
31
|
* @see [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/)
|
|
@@ -67,7 +67,6 @@ export interface FormTemplateProperties extends Partial<Pick<FormTemplate, "desc
|
|
|
67
67
|
* a string, date, boolean, or a number.
|
|
68
68
|
*
|
|
69
69
|
* @see [Element.visibilityExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/Element/#visibilityExpression)
|
|
70
|
-
* @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
|
|
71
70
|
* @see [Sample - Editing related data with calculated expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-relates-calculations/)
|
|
72
71
|
* @see [Sample - Editing with calculated field expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featureform-async/)
|
|
73
72
|
* @see [Form Constraint Profile Specification](https://developers.arcgis.com/javascript/latest/arcade/#constraint)
|
|
@@ -79,31 +78,28 @@ export interface FormTemplateProperties extends Partial<Pick<FormTemplate, "desc
|
|
|
79
78
|
/**
|
|
80
79
|
* A `FormTemplate` formats and defines the content of a [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) for
|
|
81
80
|
* a specific [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) or [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/).
|
|
82
|
-
* The `FormTemplate` allows the user to create and update feature attribute values which can be set directly on a [FeatureLayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate), [SubtypeSublayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#formTemplate),
|
|
81
|
+
* The `FormTemplate` allows the user to create and update feature attribute values which can be set directly on a [FeatureLayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate), [SubtypeSublayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#formTemplate), or within the [Editor's `layerInfo`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/).
|
|
83
82
|
* The `FormTemplate` is composed of various [elements](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/#elements) that display a specific type of form data. Each element is designed to allow the form author the ability to define the layout for fields when collecting and/or editing data.
|
|
84
83
|
*
|
|
85
84
|
* Forms can be created with a variety of elements, including:
|
|
85
|
+
* * [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/): Represents attachments in the form.
|
|
86
86
|
* * [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/): Represents a single field in the form.
|
|
87
87
|
* * [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/): Represents a group of `field`, `relationship`, or `text` elements in the form.
|
|
88
88
|
* * [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/): Represents a relationship in the form.
|
|
89
89
|
* * [TextElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/): Represents a text element in the form.
|
|
90
|
+
* * [UtilityNetworkAssociationsElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/UtilityNetworkAssociationsElement/): Represents utility network associations in the form.
|
|
90
91
|
*
|
|
91
92
|
* The `FormTemplate` also supports the use of [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expressions to define form constraints and calculations. These expressions can be used to set the [visibility](https://developers.arcgis.com/javascript/latest/references/core/form/elements/Element/#visibilityExpression) of all form elements, make [fields required](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#requiredExpression), or dynamically [calculate field values](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#valueExpression).
|
|
92
93
|
*
|
|
93
|
-
* If a `FormTemplate` is set on a [FeatureLayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate), [SubtypeSublayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#formTemplate), or the [Editor
|
|
94
|
+
* If a `FormTemplate` is set on a [FeatureLayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate), [SubtypeSublayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#formTemplate), or the [Editor's `layerInfo`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/), it is used for all features within the specified layer. If the form's template is authored using the Map Viewer's [authoring experience](https://doc.arcgis.com/en/arcgis-online/create-maps/create-form-mv.htm) or [Field Maps Designer](https://learn.arcgis.com/en/projects/build-a-form-with-field-maps-designer), the resulting saved layer or web map [item's](https://doc.arcgis.com/en/arcgis-online/get-started/item-details.htm) JSON will contain a [formInfo](https://developers.arcgis.com/web-map-specification/objects/formInfo/) object.
|
|
94
95
|
*
|
|
95
96
|
* @since 4.16
|
|
96
|
-
* @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
|
|
97
|
-
* @see [Sample - Advanced Attribute Editing](https://developers.arcgis.com/javascript/latest/sample-code/editing-featureform-fieldvisibility/)
|
|
98
|
-
* @see [Sample - Update FeatureLayer using applyEdits()](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/)
|
|
99
97
|
* @see [Sample - Editing with calculated field expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featureform-async/)
|
|
100
98
|
* @see [Sample - Edit FeatureLayers with form elements ](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-form-elements/)
|
|
101
99
|
* @see [Sample - Editing related data with calculated expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-relates-calculations/)
|
|
102
|
-
* @see [FeatureForm.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate)
|
|
103
|
-
* @see [FeatureFormViewModel.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/FeatureFormViewModel/#formTemplate)
|
|
104
100
|
* @see [FeatureLayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate)
|
|
105
101
|
* @see [SubtypeSublayer.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#formTemplate)
|
|
106
|
-
* @see [Editor
|
|
102
|
+
* @see [Editor's `layerInfo`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/)
|
|
107
103
|
* @see [Web Map Specification - formInfo](https://developers.arcgis.com/web-map-specification/objects/formInfo/)
|
|
108
104
|
* @example
|
|
109
105
|
* // Create a FieldElement
|
|
@@ -131,13 +127,6 @@ export interface FormTemplateProperties extends Partial<Pick<FormTemplate, "desc
|
|
|
131
127
|
* elements: [groupElement] // Add all elements to the template
|
|
132
128
|
* });
|
|
133
129
|
*
|
|
134
|
-
* // Add a new feature form with grouped fields
|
|
135
|
-
* const form = new FeatureForm({
|
|
136
|
-
* container: "form",
|
|
137
|
-
* groupDisplay: "sequential", // only display one group at a time
|
|
138
|
-
* formTemplate: formTemplate // set it to template created above
|
|
139
|
-
* });
|
|
140
|
-
*
|
|
141
130
|
* // Add a formtemplate to a feature layer
|
|
142
131
|
* const featureLayer = new FeatureLayer({
|
|
143
132
|
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
|
|
@@ -181,8 +170,8 @@ export default class FormTemplate extends FormTemplateSuperclass {
|
|
|
181
170
|
* > [!WARNING]
|
|
182
171
|
* >
|
|
183
172
|
* > * Nested group elements are not supported.
|
|
184
|
-
* > * The `AttachmentElement` is not yet fully supported by the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) widget. Support will be added in a future release.
|
|
185
173
|
*
|
|
174
|
+
* @see [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/)
|
|
186
175
|
* @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
|
|
187
176
|
* @see [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/)
|
|
188
177
|
* @see [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/)
|
|
@@ -225,7 +214,6 @@ export default class FormTemplate extends FormTemplateSuperclass {
|
|
|
225
214
|
* a string, date, boolean, or a number.
|
|
226
215
|
*
|
|
227
216
|
* @see [Element.visibilityExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/Element/#visibilityExpression)
|
|
228
|
-
* @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
|
|
229
217
|
* @see [Sample - Editing related data with calculated expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-relates-calculations/)
|
|
230
218
|
* @see [Sample - Editing with calculated field expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featureform-async/)
|
|
231
219
|
* @see [Form Constraint Profile Specification](https://developers.arcgis.com/javascript/latest/arcade/#constraint)
|
|
@@ -241,6 +229,13 @@ export default class FormTemplate extends FormTemplateSuperclass {
|
|
|
241
229
|
* @see [FieldElement.visibilityExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#visibilityExpression)
|
|
242
230
|
*/
|
|
243
231
|
accessor preserveFieldValuesWhenHidden: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Indicates if the form supports [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/). If this property is `true`, the form can contain attachment elements and any configured [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) will be displayed within the form itself.
|
|
234
|
+
*
|
|
235
|
+
* @default false
|
|
236
|
+
* @since 5.1
|
|
237
|
+
*/
|
|
238
|
+
accessor supportsAttachmentElements: boolean;
|
|
244
239
|
/**
|
|
245
240
|
* The string defining how to format the title displayed at the top of a form. It is possible to substitute a template string for a field value within this description.
|
|
246
241
|
*
|
|
@@ -11,7 +11,7 @@ import type { AttachmentInputProperties } from "./inputs/attachments/AttachmentI
|
|
|
11
11
|
/** @since 5.1 */
|
|
12
12
|
export interface AttachmentElementProperties extends ElementProperties, Partial<Pick<AttachmentElement, "allowUserRename" | "attachmentKeyword" | "displayFilename" | "editableExpression" | "filenameExpression" | "maxAttachmentCount" | "minAttachmentCount" | "useOriginalFilename">> {
|
|
13
13
|
/**
|
|
14
|
-
* The
|
|
14
|
+
* The user-facing inputs used for the attachment element. This defines the type of attachments allowed.
|
|
15
15
|
*
|
|
16
16
|
* @since 5.1
|
|
17
17
|
*/
|
|
@@ -19,15 +19,19 @@ export interface AttachmentElementProperties extends ElementProperties, Partial<
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* An `AttachmentElement` defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to
|
|
22
|
+
* An `AttachmentElement` defines how one or more attachments can participate in the [Editor's](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/) form. Use this approach to set attachment configurations within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) `formTemplate`. When present in the form, the user has the ability to upload an attachment specific to its corresponding [input](#input).
|
|
23
23
|
*
|
|
24
24
|
* > [!CAUTION]
|
|
25
25
|
* >
|
|
26
|
-
* >
|
|
26
|
+
* > * Any existing applications making use of attachments outside of a [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) will continue to work as they have in the past. However, to take advantage of the new capabilities provided by `AttachmentElement`, attachments must be configured in a [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) and associated to either a [feature layer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) or the [Editor's `layerInfo`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/).
|
|
27
|
+
* > * Support for attachment elements is limited to single feature creation or updates.
|
|
28
|
+
* > * Support is limited to [form templates](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) set on either the [Editor's `layerInfo`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/) or directly on a [feature layer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/).
|
|
29
|
+
* > * The feature layer must have attachments enabled and be editable for attachments.
|
|
30
|
+
* > * For attachment elements that use [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), input methods that are configured as only allowing `capture` are not supported.
|
|
31
|
+
* > * For attachment elements that use [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), minimum requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
|
|
27
32
|
*
|
|
28
33
|
* @since 5.1
|
|
29
34
|
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
|
|
30
|
-
* @see [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/)
|
|
31
35
|
* @example
|
|
32
36
|
* // Create the attachment element
|
|
33
37
|
* const attachmentElement = new AttachmentElement({
|
|
@@ -54,7 +58,7 @@ export default class AttachmentElement extends Element {
|
|
|
54
58
|
/** @since 5.1 */
|
|
55
59
|
constructor(properties?: AttachmentElementProperties);
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
61
|
+
* Indicates whether renaming of attachments is allowed by the user. If `true`, the user can rename attachments when adding them to the form. If `false`, the user cannot rename attachments and the file name will be determined by the [filenameExpression](#filenameexpression) property or generated automatically if [filenameExpression](#filenameexpression) is not specified.
|
|
58
62
|
*
|
|
59
63
|
* @default true
|
|
60
64
|
* @since 5.1
|
|
@@ -67,35 +71,54 @@ export default class AttachmentElement extends Element {
|
|
|
67
71
|
*/
|
|
68
72
|
accessor attachmentKeyword: string | null | undefined;
|
|
69
73
|
/**
|
|
70
|
-
*
|
|
74
|
+
* Indicates whether to display the file name.
|
|
71
75
|
*
|
|
72
76
|
* @default false
|
|
73
77
|
* @since 5.1
|
|
74
78
|
*/
|
|
75
79
|
accessor displayFilename: boolean | null | undefined;
|
|
76
80
|
/**
|
|
77
|
-
* A reference to an Arcade expression that returns a boolean value. When this expression evaluates to `true`, the element is editable. When the expression evaluates to `false` the element is not editable.
|
|
81
|
+
* A reference to an [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression that returns a boolean value. When this expression evaluates to `true`, the element is editable. When the expression evaluates to `false` the element is not editable.
|
|
78
82
|
*
|
|
79
83
|
* @since 5.1
|
|
80
84
|
* @see [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/form/ExpressionInfo/)
|
|
81
85
|
*/
|
|
82
86
|
accessor editableExpression: string | null | undefined;
|
|
83
87
|
/**
|
|
84
|
-
*
|
|
88
|
+
* A string-based [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression used to determine the file name of an attachment added through the form. If not specified, a unique name will be generated using the [attachmentKeyword](#attachmentKeyword) plus the current timestamp when attachment is added. This property is used when [useOriginalFilename](#useOriginalFilename) is set to `false` or when [allowUserRename](#allowUserRename) is set to `false` and the user adds an attachment without specifying a file name.
|
|
89
|
+
*
|
|
90
|
+
* > [!CAUTION]
|
|
91
|
+
* >
|
|
92
|
+
* > If wanting to set an attachment's [filenameExpression](#filenameExpression), it should be handled in-line as part of the element rather than as a reference to a shared expression.
|
|
85
93
|
*
|
|
86
94
|
* @default 'StandardizeFilename(`${$formElement.attachmentKeyword}_${Text(Now(), "YMMDDHHmmss")}`)'
|
|
95
|
+
* @example
|
|
96
|
+
* const attachmentElement = new AttachmentElement({
|
|
97
|
+
* label: "Tree canopy",
|
|
98
|
+
* allowUserRename: false,
|
|
99
|
+
* attachmentKeyword: "tree_canopy",
|
|
100
|
+
* displayFilename: true,
|
|
101
|
+
* // If not set, the default filenameExpression will generate a name using the
|
|
102
|
+
* // attachmentKeyword and current timestamp. For example: "tree_canopy_20240610123045"
|
|
103
|
+
* filenameExpression: 'StandardizeFilename(`${$formElement.attachmentKeyword}`)',
|
|
104
|
+
* input: { // autocastable to ImageInput
|
|
105
|
+
* type: "image",
|
|
106
|
+
* maxFileSize: 800
|
|
107
|
+
* },
|
|
108
|
+
* useOriginalFilename: false
|
|
109
|
+
* });
|
|
87
110
|
* @since 5.1
|
|
88
111
|
*/
|
|
89
112
|
accessor filenameExpression: string;
|
|
90
113
|
/**
|
|
91
|
-
* The
|
|
114
|
+
* The user-facing inputs used for the attachment element. This defines the type of attachments allowed.
|
|
92
115
|
*
|
|
93
116
|
* @since 5.1
|
|
94
117
|
*/
|
|
95
118
|
get input(): AttachmentInputUnion | null | undefined;
|
|
96
119
|
set input(value: ((AttachmentInputProperties & { type: "attachment" }) | (AudioInputProperties & { type: "audio" }) | (DocumentInputProperties & { type: "document" }) | (ImageInputProperties & { type: "image" }) | (SignatureInputProperties & { type: "signature" }) | (VideoInputProperties & { type: "video" })) | null | undefined);
|
|
97
120
|
/**
|
|
98
|
-
* Defines the maximum number of attachments allowed for this element. If not specified, there is no maximum number
|
|
121
|
+
* Defines the maximum number of attachments allowed for this element. If not specified, there is no maximum number requirement.
|
|
99
122
|
*
|
|
100
123
|
* @since 5.1
|
|
101
124
|
*/
|
|
@@ -103,6 +126,10 @@ export default class AttachmentElement extends Element {
|
|
|
103
126
|
/**
|
|
104
127
|
* Defines the minimum number of attachments required for this element. If not specified, there is no minimum number required.
|
|
105
128
|
*
|
|
129
|
+
* > [!CAUTION]
|
|
130
|
+
* >
|
|
131
|
+
* > For media attachment elements configured with [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), minimum file count validation is enforced only on mobile devices when the input is restricted to newly captured or recorded media and the minimum file count is greater than or equal to one.
|
|
132
|
+
*
|
|
106
133
|
* @since 5.1
|
|
107
134
|
*/
|
|
108
135
|
accessor minAttachmentCount: number | null | undefined;
|
|
@@ -113,7 +140,7 @@ export default class AttachmentElement extends Element {
|
|
|
113
140
|
*/
|
|
114
141
|
get type(): "attachment";
|
|
115
142
|
/**
|
|
116
|
-
* Determines whether the uploaded attachment's file name is preserved. If `false`, the name is updated based on
|
|
143
|
+
* Determines whether the uploaded attachment's file name is preserved. If `false`, the name is updated based on [filenameExpression](#filenameExpression).
|
|
117
144
|
*
|
|
118
145
|
* @default true
|
|
119
146
|
* @since 5.1
|
|
@@ -5,8 +5,9 @@ export interface ElementProperties extends Partial<Pick<Element, "description" |
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Form elements define what should display within the [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) elements.
|
|
8
|
-
* There are
|
|
8
|
+
* There are six specific element types:
|
|
9
9
|
*
|
|
10
|
+
* * [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/)
|
|
10
11
|
* * [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
|
|
11
12
|
* * [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/)
|
|
12
13
|
* * [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/)
|
|
@@ -27,6 +28,7 @@ export default abstract class Element extends JSONSupport {
|
|
|
27
28
|
*
|
|
28
29
|
* Possible Value | Description
|
|
29
30
|
* ---------------|-------------
|
|
31
|
+
* attachment | An [attachment](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) element defines how attachments participate in the form.
|
|
30
32
|
* field | An individual [field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) element that defines the field within a layer or [form's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate`.
|
|
31
33
|
* group | Contains a [grouping](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/) of [field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) elements.
|
|
32
34
|
* relationship | A [relationship](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/) element defines a relationship between [Map.layers](https://developers.arcgis.com/javascript/latest/references/core/Map/#layers) and [Map.tables](https://developers.arcgis.com/javascript/latest/references/core/Map/#tables) and how they participate in the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/).
|
|
@@ -46,11 +48,12 @@ export default abstract class Element extends JSONSupport {
|
|
|
46
48
|
*
|
|
47
49
|
* > [!WARNING]
|
|
48
50
|
* >
|
|
49
|
-
* > The expression must follow the specification
|
|
50
|
-
* > defined in the [Form Calculation Profile](https://developers.arcgis.com/javascript/latest/arcade/#form-calculation).
|
|
51
|
-
* >
|
|
52
|
-
* >
|
|
53
|
-
* >
|
|
51
|
+
* > * The expression must follow the specification
|
|
52
|
+
* > defined in the [Form Calculation Profile](https://developers.arcgis.com/javascript/latest/arcade/#form-calculation).
|
|
53
|
+
* > * This expression references field values within an individual feature or in other layers and must return either a date, number, or string value.
|
|
54
|
+
* > * The referenced expression must be defined in the form template's [FormTemplate.expressionInfos](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/#expressionInfos).
|
|
55
|
+
* > * It cannot be set inline within the element object.
|
|
56
|
+
* > * [Field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) and [Group](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/) elements must be visible if the field or one of the grouped fields is [required](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#requiredExpression).
|
|
54
57
|
*
|
|
55
58
|
* @see [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/form/ExpressionInfo/)
|
|
56
59
|
* @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
|
|
@@ -37,7 +37,6 @@ export interface FieldElementProperties extends ElementProperties, Partial<Pick<
|
|
|
37
37
|
*
|
|
38
38
|
* @since 4.16
|
|
39
39
|
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
|
|
40
|
-
* @see [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/)
|
|
41
40
|
* @see [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/)
|
|
42
41
|
* @see [Field](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/)
|
|
43
42
|
* @see [Sample - Editor using calculated expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featureform-async)
|
|
@@ -10,13 +10,12 @@ import type { GroupState } from "../../portal/jsonTypes.js";
|
|
|
10
10
|
|
|
11
11
|
export interface GroupElementProperties extends ElementProperties, Partial<Pick<GroupElement, "initialState">> {
|
|
12
12
|
/**
|
|
13
|
-
* An array of [field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/),
|
|
13
|
+
* An array of [field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/), [text](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/), and [attachment](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) elements to display as grouped.
|
|
14
14
|
* These objects represent an ordered list of [form](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) elements.
|
|
15
15
|
*
|
|
16
16
|
* > [!WARNING]
|
|
17
17
|
* >
|
|
18
18
|
* > * Nested group elements are not supported.
|
|
19
|
-
* > * The `AttachmentElement` is not yet fully supported by the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) widget. Support will be added in a future release.
|
|
20
19
|
*/
|
|
21
20
|
elements?: ((AttachmentElementProperties & { type: "attachment"; }) | (FieldElementProperties & { type: "field"; }) | (RelationshipElementProperties & { type: "relationship"; }) | (TextElementProperties & { type: "text"; }) | (UtilityNetworkAssociationsElementProperties & { type: "utilityNetworkAssociations"; }))[] | null;
|
|
22
21
|
}
|
|
@@ -36,8 +35,8 @@ export interface GroupElementProperties extends ElementProperties, Partial<Pick<
|
|
|
36
35
|
*
|
|
37
36
|
* > [!WARNING]
|
|
38
37
|
* >
|
|
39
|
-
* > Nested group elements are not supported.
|
|
40
|
-
* > A group element must be visible if it contains a [required](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#requiredExpression) field.
|
|
38
|
+
* > * Nested group elements are not supported.
|
|
39
|
+
* > * A group element must be visible if it contains a [required](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#requiredExpression) field.
|
|
41
40
|
*
|
|
42
41
|
* @since 4.16
|
|
43
42
|
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
|
|
@@ -86,13 +85,12 @@ export interface GroupElementProperties extends ElementProperties, Partial<Pick<
|
|
|
86
85
|
export default class GroupElement extends Element {
|
|
87
86
|
constructor(properties?: GroupElementProperties);
|
|
88
87
|
/**
|
|
89
|
-
* An array of [field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/),
|
|
88
|
+
* An array of [field](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/), [text](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/), and [attachment](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) elements to display as grouped.
|
|
90
89
|
* These objects represent an ordered list of [form](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) elements.
|
|
91
90
|
*
|
|
92
91
|
* > [!WARNING]
|
|
93
92
|
* >
|
|
94
93
|
* > * Nested group elements are not supported.
|
|
95
|
-
* > * The `AttachmentElement` is not yet fully supported by the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) widget. Support will be added in a future release.
|
|
96
94
|
*/
|
|
97
95
|
get elements(): NestableFormElementUnion[];
|
|
98
96
|
set elements(value: ((AttachmentElementProperties & { type: "attachment"; }) | (FieldElementProperties & { type: "field"; }) | (RelationshipElementProperties & { type: "relationship"; }) | (TextElementProperties & { type: "text"; }) | (UtilityNetworkAssociationsElementProperties & { type: "utilityNetworkAssociations"; }))[] | null | undefined);
|
|
@@ -18,18 +18,18 @@ export interface RelationshipElementProperties extends ElementProperties, Partia
|
|
|
18
18
|
* > [!WARNING]
|
|
19
19
|
* >
|
|
20
20
|
* > **Known Limitations when editing related data**
|
|
21
|
-
* >
|
|
22
|
-
* > Support is limited to
|
|
23
|
-
* >
|
|
24
|
-
* >
|
|
25
|
-
* >
|
|
26
|
-
* >
|
|
27
|
-
* >
|
|
21
|
+
* >
|
|
22
|
+
* > * Support is limited to One-to-one `(1:1)` and One-to-many `(1:M)` cardinality.
|
|
23
|
+
* > * Support is limited to feature-to-table and feature-to-feature relationships, ie. origin-to-destination. The origin's entry point must be a feature with geometry.
|
|
24
|
+
* > * Relationship editing is only supported using ArcGIS Online and ArcGIS Enterprise version 11.2 or higher feature services.
|
|
25
|
+
* > * The layer and associated [relationship elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/) must be editable in order for the relationship to display.
|
|
26
|
+
* > * Data containing related records will display the relationship in the associated form as long as there is a [relationship element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/) configured in the [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate). This can be accomplished via the Map Viewer's [authoring experience](https://doc.arcgis.com/en/arcgis-online/create-maps/create-form-mv.htm), [Field Maps Designer](https://learn.arcgis.com/en/projects/build-a-form-with-field-maps-designer), or programmatically using the API.
|
|
27
|
+
* > * The related layer or table must also be added to the map to be able to configure [relationship elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/).
|
|
28
|
+
* > * Relationship editing on layers with preset and group templates are not yet supported.
|
|
28
29
|
*
|
|
29
30
|
* @since 4.27
|
|
30
31
|
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
|
|
31
32
|
* @see [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/)
|
|
32
|
-
* @see [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/)
|
|
33
33
|
* @see [Sample - Edit FeatureLayers with form elements ](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-form-elements/)
|
|
34
34
|
* @see [Sample - Editing related data with calculated expressions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-relates-calculations/)
|
|
35
35
|
* @example
|