@arcgis/core 5.2.0-next.73 → 5.2.0-next.75
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/analysis/ViewshedAnalysis.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
- package/assets/esri/core/workers/chunks/{d3be4d914fc99a1d686c.js → 075e65cc4275ac886f08.js} +1 -1
- package/assets/esri/core/workers/chunks/087bd698b80ca0cea71e.js +1 -0
- package/assets/esri/core/workers/chunks/{b6c7b7b7f87dce5de811.js → 0bf644f93c180a2bc2f8.js} +1 -1
- package/assets/esri/core/workers/chunks/0d3b2d9a19383bb63f0a.js +1 -0
- package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
- package/assets/esri/core/workers/chunks/0daaa89de339e8ea4b81.js +1 -0
- package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 0eb35e09765fd74eb698.js} +1 -1
- package/assets/esri/core/workers/chunks/12234a63d3fa4bc25e7e.js +1 -0
- package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
- package/assets/esri/core/workers/chunks/1c49c9472167a2e0c923.js +1 -0
- package/assets/esri/core/workers/chunks/{cf360767310fb45660a8.js → 1cf8fb704c48ac3d3b15.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e44978ee677aa23163d.js → 2435ef7d11f8dbb920b7.js} +1 -1
- package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
- package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
- package/assets/esri/core/workers/chunks/27f574acf52f2c8bc2c9.js +1 -0
- package/assets/esri/core/workers/chunks/28f87daaba1ae3441364.js +1 -0
- package/assets/esri/core/workers/chunks/2b93888e61ca638490cf.js +1 -0
- package/assets/esri/core/workers/chunks/2c31648a4b95275516ee.js +1 -0
- package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
- package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +1 -0
- package/assets/esri/core/workers/chunks/305eea9c1fc4aee3309e.js +1 -0
- package/assets/esri/core/workers/chunks/30818b5ff0ce51b25d6f.js +1 -0
- package/assets/esri/core/workers/chunks/3235e14fedb19dd94807.js +1 -0
- package/assets/esri/core/workers/chunks/36ec5b84e551ab08b24a.js +1 -0
- package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
- package/assets/esri/core/workers/chunks/3c32471785bc8570e41c.js +1 -0
- package/assets/esri/core/workers/chunks/4046bd65d7d0677f4600.js +1 -0
- package/assets/esri/core/workers/chunks/4295822fa6ef743c76f1.js +1 -0
- package/assets/esri/core/workers/chunks/{35fd2f765d2cb3f59a22.js → 42d5ed44111bea77ec71.js} +115 -115
- package/assets/esri/core/workers/chunks/43713bc6f7eea07259d0.js +1 -0
- package/assets/esri/core/workers/chunks/{36171c72a3c04b0d13ef.js → 43a65cab888d43954564.js} +1 -1
- package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
- package/assets/esri/core/workers/chunks/46873badbd6ce8ff4e1e.js +1 -0
- package/assets/esri/core/workers/chunks/495f90fe3d0ad32bb82d.js +1 -0
- package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +1 -0
- package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
- package/assets/esri/core/workers/chunks/4fe2cca405180af23364.js +1 -0
- package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
- package/assets/esri/core/workers/chunks/519af918050b47f93516.js +1 -0
- package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → 53d165b4f30fd64e5d8a.js} +1 -1
- package/assets/esri/core/workers/chunks/552d6aecc7d88d16227b.js +1 -0
- package/assets/esri/core/workers/chunks/5627f562dea8bae2f346.js +1 -0
- package/assets/esri/core/workers/chunks/5ba3a30b7cbfa9e3aa62.js +1 -0
- package/assets/esri/core/workers/chunks/5e1d84e97de0e662aaa9.js +1 -0
- package/assets/esri/core/workers/chunks/64a1ffc221e5b63b43fb.js +1 -0
- package/assets/esri/core/workers/chunks/{31669511cfddf116d991.js → 66e60351aacbd162775f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c203df41f9d2e4b80889.js → 6743d726e45e7b660505.js} +1 -1
- package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
- package/assets/esri/core/workers/chunks/6b783f440c4a5d36e879.js +1 -0
- package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
- package/assets/esri/core/workers/chunks/6fc3553c52af6ace926d.js +1 -0
- package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
- package/assets/esri/core/workers/chunks/762be5d3e6aeaea33f74.js +29 -0
- package/assets/esri/core/workers/chunks/792303e4090c0c70c4ff.js +1 -0
- package/assets/esri/core/workers/chunks/7a24cc0f3b4eff2bdb8e.js +1 -0
- package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +1 -0
- package/assets/esri/core/workers/chunks/7dc5aedc964eacd1be5a.js +1 -0
- package/assets/esri/core/workers/chunks/81130dbcb738d40f723b.js +1 -0
- package/assets/esri/core/workers/chunks/835af7b4fd92cb4e7af0.js +1 -0
- package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
- package/assets/esri/core/workers/chunks/{96d861265566854760cd.js → 88fd698b940dadcc6dc5.js} +1 -1
- package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
- package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
- package/assets/esri/core/workers/chunks/8f0d4aec8bd3cbfefc40.js +1 -0
- package/assets/esri/core/workers/chunks/{7f208ef75ef2ce0d7cf9.js → 910c93bbbf8113a4a51f.js} +1 -1
- package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +1 -0
- package/assets/esri/core/workers/chunks/{509cfac9e5d86a8ee449.js → 936d44c7bc3a181e64a3.js} +1 -1
- package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +1 -0
- package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +1 -0
- package/assets/esri/core/workers/chunks/9cff18e6f751d1b3085e.js +1 -0
- package/assets/esri/core/workers/chunks/a101152066dd56259619.js +1 -0
- package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +1 -0
- package/assets/esri/core/workers/chunks/a50421fe79f264ae3619.js +1 -0
- package/assets/esri/core/workers/chunks/a6a2a4a2bae0d327d7ed.js +1 -0
- package/assets/esri/core/workers/chunks/a7a7d3289d4ca95f545f.js +1 -0
- package/assets/esri/core/workers/chunks/abb6c76d5dba3559a68e.js +1 -0
- package/assets/esri/core/workers/chunks/aca5c524bd3c955e9243.js +1 -0
- package/assets/esri/core/workers/chunks/b14961a9f1f40028f141.js +1 -0
- package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +1 -0
- package/assets/esri/core/workers/chunks/b6cd165d0e58598f28a5.js +1 -0
- package/assets/esri/core/workers/chunks/b78f509fd8e95f728178.js +1 -0
- package/assets/esri/core/workers/chunks/b9c61b20bbc91cb63036.js +1 -0
- package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
- package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
- package/assets/esri/core/workers/chunks/bf3dc3ad8df8488da3f0.js +1 -0
- package/assets/esri/core/workers/chunks/c1568bcd3f04014152e1.js +1 -0
- package/assets/esri/core/workers/chunks/c374e5d5980db74c4aca.js +1 -0
- package/assets/esri/core/workers/chunks/{b9953277d0cd4a01bdc6.js → c37b28f200b704ae6002.js} +1 -1
- package/assets/esri/core/workers/chunks/c67e4a848d41038367b8.js +1 -0
- package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
- package/assets/esri/core/workers/chunks/d1c7c877edc6948f3801.js +1 -0
- package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
- package/assets/esri/core/workers/chunks/d633e98b0dfa0490e4de.js +1 -0
- package/assets/esri/core/workers/chunks/d8eca13c127b443141b7.js +1 -0
- package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
- package/assets/esri/core/workers/chunks/de5013f89f0eae93978f.js +1 -0
- package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
- package/assets/esri/core/workers/chunks/e557043f90c051e93925.js +1 -0
- package/assets/esri/core/workers/chunks/e59101f1d060d0a30a65.js +1 -0
- package/assets/esri/core/workers/chunks/{bee5e738ecf8680909c4.js → eaf26c1cc938789d5336.js} +1 -1
- package/assets/esri/core/workers/chunks/eb1a86159dbc098f06fe.js +1 -0
- package/assets/esri/core/workers/chunks/ee9eb381e675d2d01260.js +1 -0
- package/assets/esri/core/workers/chunks/{014f9fd2818e2c9d9a3b.js → f43a0edf58941e2ac78e.js} +1 -1
- package/assets/esri/core/workers/chunks/f4bc563c71c478d3912f.js +1 -0
- package/assets/esri/core/workers/chunks/{4abd54518e35050feb90.js → f78acff510ca615d42e4.js} +1 -1
- package/assets/esri/core/workers/chunks/{01c92e68fb17cf2d0e08.js → f7a5c4d22a24e1ac433c.js} +1 -1
- package/assets/esri/core/workers/chunks/fb0b89bbb4f8607d5f20.js +1 -0
- package/assets/esri/core/workers/chunks/ff890167ff2baabfc4ce.js +1 -0
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/GaussianSplatShadow.glsl.js +4 -5
- package/chunks/OccludedGeometryDepth.glsl.js +5 -0
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/config.js +1 -1
- package/core/importUtils.js +2 -0
- package/geometry/operators/importUtils.js +2 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/normalizeUtils.d.ts +17 -15
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +22 -0
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/identify.js +1 -1
- package/rest/imageService.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttributeBins.js +1 -1
- package/rest/query/operations/queryPivot.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.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/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/PolylinePlugin.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawToolUtils.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/options/InteractiveToolOptions.d.ts +36 -0
- package/views/interactive/options/InteractiveToolOptions.js +2 -0
- package/views/interactive/sketch/SketchOptions.d.ts +4 -3
- package/views/interactive/sketch/SketchOptions.js +1 -1
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
- package/views/interactive/tooltip/fields/fields.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/assets/esri/core/workers/chunks/00cbff0b785e24e87d97.js +0 -1
- package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +0 -29
- package/assets/esri/core/workers/chunks/06c9aac75a01d3af6d54.js +0 -1
- package/assets/esri/core/workers/chunks/089f8c60e96d920a2cb2.js +0 -1
- package/assets/esri/core/workers/chunks/0c3c311400ee352187ea.js +0 -1
- package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
- package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
- package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
- package/assets/esri/core/workers/chunks/158d2ac0333d53556e33.js +0 -1
- package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
- package/assets/esri/core/workers/chunks/16cade1c2ddf44e336ee.js +0 -1
- package/assets/esri/core/workers/chunks/1b130af7d14eaae69d96.js +0 -1
- package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
- package/assets/esri/core/workers/chunks/1e0140556c2e3fa72545.js +0 -1
- package/assets/esri/core/workers/chunks/1e5cb72830c7f32f2961.js +0 -1
- package/assets/esri/core/workers/chunks/259bdacfb7b0f866a8d0.js +0 -1
- package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
- package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
- package/assets/esri/core/workers/chunks/2f58e1f64df2da8259a2.js +0 -1
- package/assets/esri/core/workers/chunks/383304d33b496c5d8baa.js +0 -1
- package/assets/esri/core/workers/chunks/3aacb935d632834d4154.js +0 -1
- package/assets/esri/core/workers/chunks/3c8e98cf23ad8ef12fcb.js +0 -1
- package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
- package/assets/esri/core/workers/chunks/3dc71e03a630dd50b28e.js +0 -1
- package/assets/esri/core/workers/chunks/3fd022df127af32782ce.js +0 -1
- package/assets/esri/core/workers/chunks/4344ab1250a1c550bf8b.js +0 -1
- package/assets/esri/core/workers/chunks/43de723f765ec8f268ac.js +0 -1
- package/assets/esri/core/workers/chunks/44b50d4716a2567ab6f1.js +0 -1
- package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
- package/assets/esri/core/workers/chunks/4695cd6120f60b234d5c.js +0 -1
- package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
- package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
- package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
- package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
- package/assets/esri/core/workers/chunks/582a1d468089b9986416.js +0 -1
- package/assets/esri/core/workers/chunks/5f201c77a09ae0df29d6.js +0 -1
- package/assets/esri/core/workers/chunks/6080e46fc79127500283.js +0 -1
- package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
- package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
- package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
- package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
- package/assets/esri/core/workers/chunks/67d3ff7fcefaa7d5d27f.js +0 -1
- package/assets/esri/core/workers/chunks/6a9002fcba11e2cf3f2e.js +0 -1
- package/assets/esri/core/workers/chunks/72dcd4bd1a28bf8605c5.js +0 -1
- package/assets/esri/core/workers/chunks/73f228d966b89c73c9e9.js +0 -1
- package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
- package/assets/esri/core/workers/chunks/77df0bb35d2688729479.js +0 -1
- package/assets/esri/core/workers/chunks/7a143ca61c0a70306185.js +0 -1
- package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
- package/assets/esri/core/workers/chunks/869d292a60747c93dc84.js +0 -1
- package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
- package/assets/esri/core/workers/chunks/8c76f31a363dd0c3354d.js +0 -1
- package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
- package/assets/esri/core/workers/chunks/9c57161ad48d8d546dc7.js +0 -1
- package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
- package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
- package/assets/esri/core/workers/chunks/a7f42ada0aa69873a938.js +0 -1
- package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +0 -1
- package/assets/esri/core/workers/chunks/aff0e7761276036e029d.js +0 -1
- package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
- package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
- package/assets/esri/core/workers/chunks/b7d8817018b3d277c454.js +0 -1
- package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
- package/assets/esri/core/workers/chunks/ba4f419f46be09a9a55c.js +0 -1
- package/assets/esri/core/workers/chunks/bfb6566c27c09deb0929.js +0 -1
- package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
- package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
- package/assets/esri/core/workers/chunks/c715c585c42d8c2b86f5.js +0 -1
- package/assets/esri/core/workers/chunks/c7e9513f75b8ec205562.js +0 -1
- package/assets/esri/core/workers/chunks/c838cc1c786368b78598.js +0 -1
- package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
- package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
- package/assets/esri/core/workers/chunks/cd4e5c948d1bfa9b9a2d.js +0 -1
- package/assets/esri/core/workers/chunks/cfe31b7d1c6c05fbd268.js +0 -1
- package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
- package/assets/esri/core/workers/chunks/d0c1bc90e474f706211c.js +0 -1
- package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
- package/assets/esri/core/workers/chunks/d901f8503a73277cfa58.js +0 -1
- package/assets/esri/core/workers/chunks/da484787bd9fd3b13d15.js +0 -1
- package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
- package/assets/esri/core/workers/chunks/e21b3490bfce75405e55.js +0 -1
- package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +0 -1
- package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
- package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
- package/assets/esri/core/workers/chunks/e702abaeccef20b64a81.js +0 -1
- package/assets/esri/core/workers/chunks/ebd619533be077059494.js +0 -1
- package/assets/esri/core/workers/chunks/f475672ff4c2ec9367c2.js +0 -1
- package/assets/esri/core/workers/chunks/f69329b85b362b349a8c.js +0 -1
- package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
- package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
- package/assets/esri/core/workers/chunks/fba8065a3a6fbd877e23.js +0 -1
- package/assets/esri/core/workers/chunks/fec07a16b72cdcafc641.js +0 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
|
@@ -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{createTask as o}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{destroyMaybe as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{createTask as o}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import s from"../../../../core/ReactiveMap.js";import{watch as l,syncAndInitial as a,initial as p}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{isLoaded as m,load as f}from"../../../../geometry/coordinateFormatter.js";import{absoluteHeightElevationInfo as h}from"../../../../support/elevationInfoUtils.js";import{ManagedTooltipField as g}from"../ManagedTooltipField.js";import{getConstraintContext as v}from"../../../interactive/sketch/constraintUtils.js";import{makeTooltip as y}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{makeScalarField as _,makeOrientationField as H,makeAreaField as F,makeLengthField as T,makeRadiusField as I,makeTotalLengthField as x,makeSizeField as w,makeScaleField as M,makeYField as j,makeXField as A,makeLongitudeField as k,makeLatitudeField as b,makeElevationField as E,makeDistanceField as C,makeDirectionField as O}from"../../../interactive/tooltip/fields/fields.js";import{TooltipField as L}from"../../../interactive/tooltip/fields/TooltipField.js";import{DynamicTooltipInfo as P,isKnownConstraintField as S}from"../../../interactive/tooltip/infos/DynamicTooltipInfo.js";let R=class extends e{constructor(t){super(t),this._pluginTooltipFieldRegistry=new s,this._updatingHandles=new u,this._coordinateFormatterLoadTask=null,this._constraintSnapshot=null,this.constraintsEnabled=!0,this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled=!1}initialize(){this.addHandles([l(()=>[this.effectiveEnabled,this.context?.view,this.context?.toolOptions],([t,e,o])=>{const{context:i}=this;t&&e&&o?(this._tooltipInfo??=new P({toolOptions:o,getAllFields:()=>this.allFields,getActiveHandle:()=>this.effectiveActiveHandle,getHelpMessageKey:()=>this.context?.getHelpMessageKey(),viewType:e.type}),this._tooltip||this._setupTooltip(i)):(this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo),this.inputModeHandle=null)},a)])}destroy(){this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo)}get context(){return this.getDependencies?.()}get focusedHandle(){return this.context?.getActiveHandle?.()}get allHandles(){return this.context?.getAllHandles?.()}get effectiveActiveHandle(){return this._tooltip?.isInInputMode?this.inputModeHandle:this.focusedHandle}get updating(){return this._updatingHandles.updating}get tooltip(){return this._tooltip}get tooltipInfo(){return this._tooltipInfo}get elevationConstraint(){return this.getConstraints(this.focusedHandle)?.elevation}get allFields(){return Array.from(this._pluginTooltipFieldRegistry.values()).flatMap(t=>Array.from(t.values()))}get effectiveEnabled(){return this.context?.toolOptions.tooltips.effectiveEnabled||this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled}getConstraints(t){const{tooltipInfo:e,context:o}=this,{view:i,editGeometryOperations:n,elevationInfo:r,toolOptions:s}=o??{},l=this.getLastScreenPosition?.();if(!(l&&i&&e&&n&&s))return null;const{coordinateHelper:a,spatialReference:p}=n.data,d=i.toMap(l);if(!d)return null;const c=v(d,i,p,r??h,a.hasZ(),s.values.effectiveDirectionMode);return{...V(e.getConstraintFieldsForHandle(t)),context:c}}storeConstraintSnapshot(){const t=this.tooltipInfo?.allFields.filter(t=>t.locked&&!t.unlockOnVertexPlacement).filter(S);this._constraintSnapshot=t?.length?V(t):null}unlockOnVertexPlacement(){this.tooltipInfo?.allFields.forEach(t=>{t.unlockOnVertexPlacement&&(t.committed=null)})}unregisterPluginFields(t){const e=this._pluginTooltipFieldRegistry.get(t);e?.forEach(t=>t.destroy()),e?.clear(),this._pluginTooltipFieldRegistry.delete(t)}createMeasuredField(t,{id:e,preset:o,getMeasurementInput:i,measure:n,fieldProperties:r,fieldFilters:s}){const a=this._getOrCreateField(t,e,o,r,s);return a.registerMeasurement(i,n,()=>this.tooltipInfo?.renderContext),a.addHandles(l(()=>this.tooltipInfo?.isEffectiveVisibleField(a.field),t=>a.enabled=!!t,p)),a}createCustomField(t,{id:e,preset:o,fieldProperties:i,fieldFilters:n}){return this._getOrCreateField(t,e,o,i,n)}_setupTooltip(t){const e=this._tooltip=y(()=>({view:t.view,options:t.toolOptions.tooltips,info:this.tooltipInfo}));e.addHandles([l(()=>this.focusedHandle,t=>{(t&&(!e.isInInputMode||null==this.inputModeHandle)||this.inputModeHandle&&!this.allHandles?.includes(this.inputModeHandle))&&(this.inputModeHandle=t)},a),l(()=>this.focusedHandle?.screenPosition,t=>{t?(e.position=t,e.hidden=!1):e.hidden=!0},a),e.on("commit",()=>{this.context?.notifyTooltipsChanged()})]),this._coordinateFormatterLoadTask||m()||(this._coordinateFormatterLoadTask=o(()=>f()),this.addHandles(this._coordinateFormatterLoadTask),this._updatingHandles.addPromise(this._coordinateFormatterLoadTask.promise))}_getOrCreateField(t,e,o,i,r){const l=n(this._pluginTooltipFieldRegistry,t,()=>new s);if(l.has(e))return l.get(e);const a=G(o,i),p=new g({field:a,displayGroup:i?.displayGroup,...r});l.set(e,p);const d=S(a)?this._constraintSnapshot?.[a.name]:void 0;return d&&a.lock(d),p}};function U(t){return null!=t&&"unit"in t&&"rotationType"in t?t:null}function D(t){return null==t||"rotationType"in t?null:t}function G(t,e){const o=e?{...e}:{};switch(delete o.displayGroup,t){case"area":return F({...o,name:"area"});case"direction":return O({...o,name:"direction"});case"distance":return C({...o,name:"distance"});case"elevation":{const t=E({...o,name:"elevation"});return t.showAsZ=!0,t}case"latitude":return b({...o,name:"y"});case"longitude":return k({...o,name:"x"});case"x":return A({...o,name:"x"});case"y":return j({...o,name:"y"});case"orientation":return H({...o,name:"orientation"});case"scale":return M({...o,name:"scale"});case"size":return w({...o,name:"size"});case"totalLength":return x({...o,name:"totalLength"});case"radius":return I({...o,name:"radius"});case"generic-length":return T({...o,name:null});case"generic-area":return F({...o,name:null});case"generic-angle":return H({...o,name:null});case"generic-scalar":return _({...o,name:null});default:if(!o)throw new i("draw-tool:tooltips:invalid-field-config","Attempted to create a tooltip without a preset definition and without tooltip configuration.");return new L(o)}}function V(t){const e={};for(const o of t)switch(o.name){case"direction":case"distance":case"elevation":e[o.name]=o.committed;break;case"x":e[o.name]=D(o.committed),e.longitude=U(o.committed);break;case"y":e[o.name]=D(o.committed),e.latitude=U(o.committed)}return e}t([d()],R.prototype,"_updatingHandles",void 0),t([d()],R.prototype,"_tooltip",void 0),t([d()],R.prototype,"_tooltipInfo",void 0),t([d()],R.prototype,"_coordinateFormatterLoadTask",void 0),t([d()],R.prototype,"_constraintSnapshot",void 0),t([d()],R.prototype,"getDependencies",void 0),t([d()],R.prototype,"getLastScreenPosition",void 0),t([d()],R.prototype,"context",null),t([d()],R.prototype,"inputModeHandle",void 0),t([d()],R.prototype,"focusedHandle",null),t([d()],R.prototype,"allHandles",null),t([d()],R.prototype,"effectiveActiveHandle",null),t([d()],R.prototype,"updating",null),t([d()],R.prototype,"tooltip",null),t([d()],R.prototype,"tooltipInfo",null),t([d()],R.prototype,"constraintsEnabled",void 0),t([d()],R.prototype,"elevationConstraint",null),t([d()],R.prototype,"allFields",null),t([d()],R.prototype,"keepTooltipAliveEvenWhenTooltipsAreNotEnabled",void 0),t([d()],R.prototype,"effectiveEnabled",null),R=t([c("esri.views.draw.support.managers.TooltipManager")],R);export{R as TooltipManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{handlesGroup as e}from"../../../core/handleUtils.js";import{debounce as t}from"../../../core/promiseUtils.js";import{zeroMeters as o}from"../../../core/quantity.js";import{watch as n,syncAndInitial as i,sync as r}from"../../../core/reactiveUtils.js";import{createScreenPoint as a}from"../../../core/screenUtils.js";import s from"../../../geometry/Point.js";import{isCurvedGeometry as c}from"../../../geometry/support/curves/curveUtils.js";import{connectPasteEvent as l,getXYZDeltasFromTooltipInfo as p}from"../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as m}from"../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{SelectedVertexTooltipInfo as u}from"../../interactive/tooltip/infos/SelectedVertexTooltipInfo.js";import{TranslateTooltipInfo as f}from"../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateVertexTooltipInfo as y}from"../../interactive/tooltip/infos/TranslateVertexTooltipInfo.js";import{elevationFromPoint as v}from"../../support/euclideanLengthMeasurementUtils.js";function g(e){const t={
|
|
2
|
+
import{handlesGroup as e}from"../../../core/handleUtils.js";import{debounce as t}from"../../../core/promiseUtils.js";import{zeroMeters as o}from"../../../core/quantity.js";import{watch as n,syncAndInitial as i,sync as r}from"../../../core/reactiveUtils.js";import{createScreenPoint as a}from"../../../core/screenUtils.js";import s from"../../../geometry/Point.js";import{isCurvedGeometry as c}from"../../../geometry/support/curves/curveUtils.js";import{connectPasteEvent as l,getXYZDeltasFromTooltipInfo as p}from"../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as m}from"../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{SelectedVertexTooltipInfo as u}from"../../interactive/tooltip/infos/SelectedVertexTooltipInfo.js";import{TranslateTooltipInfo as f}from"../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateVertexTooltipInfo as y}from"../../interactive/tooltip/infos/TranslateVertexTooltipInfo.js";import{elevationFromPoint as v}from"../../support/euclideanLengthMeasurementUtils.js";function g(e){const t={toolOptions:e,viewType:"2d"};return{movePoint:new m(t),selectedVertex:new u(t),translateGraphic:new f(t),translateVertices:new y(t)}}function h(o,a,s){function c(){const e=a(),t=e.toolOptions.tooltips.effectiveEnabled?e.activeTooltipInfo:null;return{...e,activeTooltipInfo:t}}let p=!1;function m(e){p||(p=!0,e(),p=!1)}const u=t(e=>x(e)),f=e=>{m(()=>{d(e),o.info=e.activeTooltipInfo,s.consumePromise(u(e))})};return e([n(()=>{const e=c();return{context:e,geometry:e.graphic?.geometry,vertexGeometry:e.selectedVertex?.geometry}},({context:e})=>f(e),i),n(()=>{const e=c(),{activeTooltipInfo:t}=e;if(t&&"key"in t)return{context:e,key:t.key}},(e,t)=>{e&&t&&e.key!==t.key&&m(()=>b(e.context))},r),l(o,{onBeforePaste:()=>{p=!0},onAfterPaste:()=>{b(c()),p=!1}})])}function d(e){const t=e.activeTooltipInfo;if(t)switch(t.toolOptions=e.toolOptions,t?.type){case"move-point":w(t,e);break;case"selected-vertex":T(t,e)}}async function x(e){const t=e.activeTooltipInfo;if("selected-vertex"===t?.type)return await k(t,e)}function w(e,{graphic:t}){j(e,t,t?.geometry)}function T(e,{graphic:t,selectedVertex:o}){j(e,t,o?.geometry);const n=t?.geometry;if(!n||!c(n))switch(n?.type){case"polygon":e.geometryType="polygon",e.totalLength.visible=!1;break;case"polyline":e.geometryType="polyline",e.area.visible=!1;break;case"multipoint":e.geometryType="multipoint",e.area.visible=!1,e.totalLength.visible=!1}}async function k(e,{graphic:t,measurementWorker:o}){const n=t?.geometry;switch(n?.type){case"polygon":e.area.actual=(await o.autoArea2D(n)).area;break;case"polyline":e.totalLength.actual=await o.autoLength2D(n)}}function j(e,t,o){t&&"point"===o?.type&&(e.setLocationFromPoint(o),e.elevation.actual=v(o),e.elevation.visible=!!t.geometry?.hasZ,e.elevation.readOnly=!1,e.elevation.showAsZ=!0)}function b(e){function t(t,o){const n=o?.geometry;if(!n||"point"!==n.type)return;const{dx:i,dy:r,dz:a}=p(t,n);if(0===i&&0===r&&0===a)return;const{x:c,y:l,z:m,m:u,spatialReference:f}=n,y=new s({x:c+i,y:l+r,z:null!=m?m+a:void 0,m:u,spatialReference:f});e.updateGeometry(o,y,n,i,r)}const{activeTooltipInfo:o,graphic:n,selectedVertex:i}=e;switch(o?.type){case"move-point":return t(o,n);case"selected-vertex":return t(o,i)}}function P(e,t,o,n,i){n.consumePromise(I(e,t,i,o))}const I=t(V);function L(e,t,o,n,i,r){e.elevation=null,i.consumePromise(D(e,t,r,o,n))}const D=t(U);async function U(e,t,n,i,{measurementWorker:r}){const s=[];if(n){const{x:o,y:i}=n.origin,c=t.toMap(n),l=t.toMap(a(o,i));s.push(r.autoDistance2DBetweenPoints(l,c).then(t=>{e.distance=t}))}else e.distance=o;switch(i?.type){case"polygon":s.push(r.autoArea2D(i).then(({area:t})=>{e.area=t,e.totalLength=null}));break;case"polyline":s.push(r.autoLength2D(i).then(t=>{e.area=null,e.totalLength=t}));break;default:e.area=null}await Promise.allSettled(s)}async function V(e,t,n,{measurementWorker:i}){if(!n)return void(e.distance=o);const{x:r,y:s}=n.origin,c=t.toMap(n),l=t.toMap(a(r,s));e.distance=await i.autoDistance2DBetweenPoints(l,c)}export{h as connectTooltip,g as createTooltipInfos,P as updateTranslateTooltipInfo,L as updateTranslateVertexTooltipInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{debounce as e}from"../../../core/promiseUtils.js";import{valueInUnit as t,createLength as o,zeroDegreesGeographic as n,zeroMeters as i,zeroSquareMeters as r}from"../../../core/quantity.js";import{getMetersPerVerticalUnitForSR as a}from"../../../core/units.js";import{ensureType as
|
|
2
|
+
import{debounce as e}from"../../../core/promiseUtils.js";import{valueInUnit as t,createLength as o,zeroDegreesGeographic as n,zeroMeters as i,zeroSquareMeters as r}from"../../../core/quantity.js";import{getMetersPerVerticalUnitForSR as a}from"../../../core/units.js";import{ensureType as l}from"../../../core/accessorSupport/ensureType.js";import c from"../../../geometry/Point.js";import{absoluteHeightElevationInfo as s,getConvertedElevationFromXYZ as p}from"../../../support/elevationInfoUtils.js";import{getDrawHelpMessage as u}from"./helpMessageUtils.js";import{getDrawMeshHelpMessage as m}from"./helpMessageUtils3d.js";import{getConstraintContext as d}from"../../interactive/sketch/constraintUtils.js";import{updateTooltipInfoFromMeshTransform as y}from"../../interactive/tooltip/tooltipCommonUtils.js";import{DrawCircleTooltipInfo as f}from"../../interactive/tooltip/infos/DrawCircleTooltipInfo.js";import{DrawMeshTooltipInfo as w}from"../../interactive/tooltip/infos/DrawMeshTooltipInfo.js";import{DrawMultipointTooltipInfo as g}from"../../interactive/tooltip/infos/DrawMultipointTooltipInfo.js";import{DrawPointTooltipInfo as h}from"../../interactive/tooltip/infos/DrawPointTooltipInfo.js";import{DrawPolygonTooltipInfo as v}from"../../interactive/tooltip/infos/DrawPolygonTooltipInfo.js";import{DrawPolylineTooltipInfo as O}from"../../interactive/tooltip/infos/DrawPolylineTooltipInfo.js";import{DrawRectangleTooltipInfo as M}from"../../interactive/tooltip/infos/DrawRectangleTooltipInfo.js";import{directionForVertices as x}from"../../support/angularMeasurementUtils.js";import{elevationFromZ as k}from"../../support/euclideanLengthMeasurementUtils.js";function P(e,t){return{point:new h({toolOptions:t,viewType:e}),multipoint:new g({toolOptions:t,viewType:e}),polyline:new O({toolOptions:t,viewType:e}),polygon:new v({toolOptions:t,viewType:e}),mesh:new w({toolOptions:t,viewType:e}),rectangle:new M({toolOptions:t}),circle:new f({toolOptions:t})}}function D(e){const{directionOptions:t,geometryType:o,toolOptions:n,tooltipInfos:i}=e,r=t=>{const o=ee(e).mode,n=i[t].elevation;"relative-to-ground"===o||"relative-to-scene"===o||"on-the-ground"===o?n.lock(oe(e)):n.unlock()},a=e=>{if(t){const o=i[e].direction;o.committed=t.angle,o.unlockOnVertexPlacement=!1,n.values.directionMode=t.mode}};switch(o){case"polygon":case"polyline":r(o),a(o);break;case"point":case"mesh":r(o)}}function j(e,t){const{drawOperation:o,view:n}=t,i=b(t),r=ee(t);if("2d"===n.type||!e||"absolute-height"!==r.mode||1!==o?.numCommittedVertices||!i||"draw-polyline"!==i.type&&"draw-polygon"!==i.type||i.elevation.locked)return;const[a,l,c]=e,s=_(a,l,c,r,t);null!=s&&i.elevation.lock(s)}function T(e){b(e)?.allFields.forEach(e=>{e.unlockOnVertexPlacement&&e.unlock()})}function b({geometryType:e,graphic:t,tooltipInfos:o}){return t?.geometry?.type!==I[e]?"circle"===e||"rectangle"===e?o[e]:null:o[e]}const I={point:"point",multipoint:"multipoint",mesh:"mesh",polyline:"polyline",polygon:"polygon",circle:"polygon",rectangle:"polygon",freehandPolygon:"polygon",freehandPolyline:"polyline",text:"point"};function V(e,t,o){switch(e?.type){case"draw-point":G(e,t);break;case"draw-multipoint":L(e,t);break;case"draw-polyline":W(e,t);break;case"draw-polygon":F(e,t);break;case"draw-rectangle":R(e,t);break;case"draw-circle":X(e,t);break;case"draw-mesh":S(e,t)}o.consumePromise(U(e,t))}const U=e(async(e,t)=>{switch(e?.type){case"draw-polygon":return await B(e,t);case"draw-polyline":return await Z(e,t);case"draw-rectangle":return await q(e,t);case"draw-circle":return await Y(e,t)}});function G(e,t){const o=t.graphic?.geometry;"point"===o?.type&&(z(e,t),e.helpMessage=u("point",o,t.drawOperation.drawingMode))}function L(e,t){const o=t.graphic?.geometry;"multipoint"===o?.type&&(z(e,t),e.helpMessage=u("multipoint",o,t.drawOperation.drawingMode))}function S(e,t){const{graphic:o,view:n}=t,i=o?.geometry;"3d"!==n.type||i&&"mesh"!==i.type||(z(e,t),i&&y(e,i),e.helpMessage=m(o,n))}function z(e,t){const{drawOperation:o,view:n,toolOptions:i}=t,{cursorVertex:r,hasZ:a}=o;e.toolOptions=i,e.viewType=n.type,e.setLocationFromPoint(r,te(t)),e.setElevationFromPoint(r,{hasZ:a}),o.constraints=r?{context:ne(r,t),x:e.x.committed,y:e.y.committed,longitude:e.longitude.committed,latitude:e.latitude.committed,elevation:e.elevation.committed,distance:null,direction:null}:void 0}function W(e,t){const{createOperationGeometry:o}=t,n=null!=o?o.full:null;n&&"polyline"!==n.type||(E(e,t),e.helpMessage=u("polyline",n,t.drawOperation.drawingMode))}async function Z(e,t){const{createOperationGeometry:o,drawOperation:n}=t,r=null!=o?o.full:null;if(r&&"polyline"!==r.type)return;const a=[A(e,t)];n.lastVertex?r?a.push(t.measurementWorker.autoLength2D(r).then(t=>e.totalLength.actual=t)):e.totalLength.actual=i:e.totalLength.actual=null,await Promise.all(a)}function F(e,t){const{createOperationGeometry:o}=t,n=null!=o?o.full:null;n&&"polygon"!==n.type||(E(e,t),e.helpMessage=u("polygon",n,t.drawOperation.drawingMode))}async function B(e,t){const{createOperationGeometry:o,drawOperation:n}=t,i=null!=o?o.full:null;if(i&&"polygon"!==i.type)return;const a=[A(e,t)];n.lastVertex?i?a.push(t.measurementWorker.autoArea2D(i).then(({area:t})=>e.area.actual=t)):e.area.actual=r:e.area.actual=null,await Promise.all(a)}const C=l(c);function E(e,t){const{drawOperation:o,toolOptions:i,view:r}=t,{cursorVertex:a,lastVertex:l,secondToLastVertex:c,hasZ:s}=o,p=i.values.effectiveDirectionMode;e.toolOptions=i,e.viewType=r.type,e.distance.readOnly=null==l;const u=null!==l&&("absolute"===p||c);if(e.direction.actual=null,e.direction.readOnly=!u,u&&a){const t=x(c,l,a,p);e.direction.actual=t??n}e.setLocationFromPoint(a,te(t)),e.setElevationFromPoint(a,{hasZ:s});const m=H(l,t);e.xyMode=m,e.direction.visible="direction-distance"===m,e.distance.visible="direction-distance"===m,e.effectiveX.visible="coordinates"===m,e.effectiveY.visible="coordinates"===m;const d=a??l;o.constraints=d?{context:ne(d,t),x:e.x.committed,y:e.y.committed,longitude:e.longitude.committed,latitude:e.latitude.committed,elevation:e.elevation.committed,distance:e.distance.committed,direction:e.direction.committed}:void 0}async function A(e,t){const{drawOperation:o,measurementWorker:n}=t,{cursorVertex:r,lastVertex:a}=o,l=a&&r?await(n.autoDistance2DBetweenPoints(C(a),C(r))??i):null;e.distance.actual=l}function H(e,{toolOptions:t}){const o=t.tooltips.xyMode;return"auto"===o?e?"direction-distance":"coordinates":o}function R(e,t){e.toolOptions=t.toolOptions,e.helpMessage=u("rectangle",t.graphic?.geometry,t.drawOperation.drawingMode)}async function q(e,t){await Promise.all([K(t).then(t=>e.xSize=t),N(t).then(t=>e.ySize=t),J(t).then(t=>e.area=t)])}function X(e,t){const{toolOptions:o}=t;e.toolOptions=o,e.helpMessage=u("circle",t.graphic?.geometry,t.drawOperation.drawingMode)}async function Y(e,t){const{forceUniformSize:o}=t,n=[J(t).then(t=>e.area=t)];o?(e.xSize=null,e.ySize=null,n.push(Q(t).then(t=>e.radius=t))):(e.radius=null,n.push(K(t).then(t=>e.xSize=t)),n.push(N(t).then(t=>e.ySize=t))),await Promise.all(n)}async function J({createOperationGeometry:e,measurementWorker:t}){const o=e?.full;return"polygon"!==o?.type?r:(await t.autoArea2D(o)).area??r}async function K({createOperationGeometry:e,measurementWorker:t}){const o=e?.rectangle?.midpoints;return(null!=o?await t.autoDistance2DBetweenPoints(o.left,o.right):null)??i}async function N({createOperationGeometry:e,measurementWorker:t}){const o=e?.rectangle?.midpoints;return(null!=o?await t.autoDistance2DBetweenPoints(o.top,o.bottom):null)??i}async function Q({createOperationGeometry:e,measurementWorker:t}){return(null!=e?.circle?.center&&null!=e.circle.edge?await t.autoDistance2DBetweenPoints(e.circle.center,e.circle.edge):null)??i}function $(e){const{geometryType:o,tooltipInfos:n}=e;switch(o){case"point":case"multipoint":case"mesh":case"polyline":case"polygon":{const i=n[o].elevation.committed;if(!i)return;return t(i,"meters")/a(te(e))}default:return}}function _(e,t,o,n,i){const{view:r,drawOperation:a}=i;if("3d"!==r.type||!a)return;o??=0;const l=te(i),c=ee(i),s=p(r,e,t,o,l,c,n);return k(s,l)??oe(i)}function ee(e){return e.drawOperation.elevationInfo??s}function te(e){return e.drawOperation.coordinateHelper.spatialReference}function oe(e){const t=a(te(e));return o(e.defaultZ*t,"meters")}function ne(e,t){return d(e,t.view,te(t),ee(t),t.drawOperation.coordinateHelper.hasZ(),t.toolOptions.values.effectiveDirectionMode)}export{P as createTooltipInfos,b as getActiveTooltipInfo,$ as getConstraintZ,D as initializeConstraints,j as lockElevationOnVertexAdd,T as unlockConstraintsOnVertexAddOrRemove,V as updateTooltipInfo};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type Accessor from "../../../core/Accessor.js";
|
|
2
|
+
import type LabelOptions from "./LabelOptions.js";
|
|
3
|
+
import type TooltipOptions from "./TooltipOptions.js";
|
|
4
|
+
import type ValueOptions from "./ValueOptions.js";
|
|
5
|
+
import type { LabelOptionsProperties } from "./LabelOptions.js";
|
|
6
|
+
import type { TooltipOptionsProperties } from "./TooltipOptions.js";
|
|
7
|
+
import type { ValueOptionsProperties } from "./ValueOptions.js";
|
|
8
|
+
|
|
9
|
+
/** @internal */
|
|
10
|
+
export interface InteractiveToolOptionsProperties {
|
|
11
|
+
/** @internal */
|
|
12
|
+
labels?: LabelOptionsProperties;
|
|
13
|
+
/** @internal */
|
|
14
|
+
tooltips?: TooltipOptionsProperties;
|
|
15
|
+
/** @internal */
|
|
16
|
+
values?: ValueOptionsProperties;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Class which groups settings used by interactive tools so that they can be passed around together.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export default class InteractiveToolOptions extends Accessor {
|
|
25
|
+
/** @internal */
|
|
26
|
+
constructor(properties?: InteractiveToolOptionsProperties);
|
|
27
|
+
/** @internal */
|
|
28
|
+
get labels(): LabelOptions;
|
|
29
|
+
set labels(value: LabelOptionsProperties);
|
|
30
|
+
/** @internal */
|
|
31
|
+
get tooltips(): TooltipOptions;
|
|
32
|
+
set tooltips(value: TooltipOptionsProperties);
|
|
33
|
+
/** @internal */
|
|
34
|
+
get values(): ValueOptions;
|
|
35
|
+
set values(value: ValueOptionsProperties);
|
|
36
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./LabelOptions.js";import p from"./TooltipOptions.js";import i from"./ValueOptions.js";let l=class extends t{constructor(o){super(o),this.labels=new r,this.tooltips=new p,this.values=new i}};o([e({nonNullable:!0,type:r})],l.prototype,"labels",void 0),o([e({nonNullable:!0,type:p})],l.prototype,"tooltips",void 0),o([e({nonNullable:!0,type:i})],l.prototype,"values",void 0),l=o([s("esri.views.interactive.options.InteractiveToolOptions")],l);const n=l;export{n as default};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type InteractiveToolOptions from "../options/InteractiveToolOptions.js";
|
|
2
2
|
import type SketchLabelOptions from "./SketchLabelOptions.js";
|
|
3
3
|
import type SketchTooltipOptions from "./SketchTooltipOptions.js";
|
|
4
4
|
import type SketchValueOptions from "./SketchValueOptions.js";
|
|
5
5
|
import type { SketchLabelOptionsProperties } from "./SketchLabelOptions.js";
|
|
6
6
|
import type { SketchTooltipOptionsProperties } from "./SketchTooltipOptions.js";
|
|
7
7
|
import type { SketchValueOptionsProperties } from "./SketchValueOptions.js";
|
|
8
|
+
import type { InteractiveToolOptionsProperties } from "../options/InteractiveToolOptions.js";
|
|
8
9
|
|
|
9
10
|
/** @internal */
|
|
10
|
-
export interface SketchOptionsProperties {
|
|
11
|
+
export interface SketchOptionsProperties extends InteractiveToolOptionsProperties {
|
|
11
12
|
/** @internal */
|
|
12
13
|
labels?: SketchLabelOptionsProperties;
|
|
13
14
|
/** @internal */
|
|
@@ -21,7 +22,7 @@ export interface SketchOptionsProperties {
|
|
|
21
22
|
*
|
|
22
23
|
* @internal
|
|
23
24
|
*/
|
|
24
|
-
export default class SketchOptions extends
|
|
25
|
+
export default class SketchOptions extends InteractiveToolOptions {
|
|
25
26
|
/** @internal */
|
|
26
27
|
constructor(properties?: SketchOptionsProperties);
|
|
27
28
|
/** @internal */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import
|
|
2
|
+
import{__decorate as o}from"tslib";import{property as t,subclass as e}from"../../../core/accessorSupport/decorators.js";import s from"../options/InteractiveToolOptions.js";import p from"./SketchLabelOptions.js";import i from"./SketchTooltipOptions.js";import r from"./SketchValueOptions.js";let l=class extends s{constructor(o){super(o),this.labels=new p,this.tooltips=new i,this.values=new r}};o([t({nonNullable:!0,type:p})],l.prototype,"labels",void 0),o([t({nonNullable:!0,type:i})],l.prototype,"tooltips",void 0),o([t({nonNullable:!0,type:r})],l.prototype,"values",void 0),l=o([e("esri.views.interactive.sketch.SketchOptions")],l);const n=l;export{n as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{drawContentHeaderActions as i}from"../css.js";import{directionModeIcons as s}from"./directionModeIcons.js";import r from"../../../../widgets/Widget.js";import{loadCalciteComponents as n}from"../../../../widgets/support/componentsUtils.js";import{tsx as
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{drawContentHeaderActions as i}from"../css.js";import{directionModeIcons as s}from"./directionModeIcons.js";import r from"../../../../widgets/Widget.js";import{loadCalciteComponents as n}from"../../../../widgets/support/componentsUtils.js";import{tsx as l,messageBundle as c}from"../../../../widgets/support/widget.js";let d=class extends r{constructor(e){super(e),this.visibleElements={}}render(){return l("div",{class:i},this._isElementVisible("direction")?l(a,{messages:this.messages,toolOptions:this.toolOptions,topLayerDisabled:this.topLayerDisabled}):null)}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group")})}_isElementVisible(e){return this.visibleElements?.[e]??this.toolOptions.tooltips.visibleElements[e]}};function a(e){const{directionMode:t}=e.toolOptions.values,o=e.messages?.sketch,i=o?.directionModeSelect?.title,r="absolute",n="relative";return l("calcite-dropdown",{key:"direction-mode",placement:"bottom-end",scale:"s",topLayerDisabled:e.topLayerDisabled,onCalciteDropdownSelect:t=>{const o=t.currentTarget.selectedItems?.[0]?.getAttribute("data-mode");e.toolOptions.values.directionMode=o??"absolute"}},l("calcite-button",{alignment:"end",appearance:"transparent",iconStart:s[t],kind:"neutral",label:i,scale:"s",slot:"trigger",title:i}),l("calcite-dropdown-group",{selectionMode:"single"},l("calcite-dropdown-item",{"data-mode":n,"data-testid":"tooltip-direction-mode-relative",iconStart:s.relative,key:"relative",selected:t===n},o?.directionModeSelect?.relative),l("calcite-dropdown-item",{"data-mode":r,"data-testid":"tooltip-direction-mode-absolute",iconStart:s.absolute,key:"absolute",selected:t===r},o?.directionModeSelect?.absolute)))}e([c("esri/views/interactive/tooltip/t9n/Tooltip"),t()],d.prototype,"messages",void 0),e([t()],d.prototype,"toolOptions",void 0),e([t()],d.prototype,"visibleElements",void 0),d=e([o("esri.views.interactive.tooltip.components.DrawHeaderActions")],d);export{d as DrawHeaderActions};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfNotAbortError as
|
|
2
|
+
import{__decorate as t}from"tslib";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfNotAbortError as n,throwIfAborted as s,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as c}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as p,defaultVerticalLengthUnit as d,defaultLengthUnit as u}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as _}from"../../keybindings.js";import{table as g,contentHeader as y,contentHeaderSpacer as v,contentHeaderActions as b,contentInputMode as w,content as I,helpMessageText as A,helpMessageIcon as C,helpMessage as D,drawContentHeaderActions as M}from"../css.js";import{getFormatters as U}from"../fields/parsingAndFormattingUtils.js";import F from"../../../../widgets/Widget.js";import{loadCalciteComponents as j}from"../../../../widgets/support/componentsUtils.js";import{tsx as k,tsxFragment as x,classes as E,messageBundle as T}from"../../../../widgets/support/widget.js";const H=Symbol("dragHandles");let N=class extends F{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=i(U),this._onHeaderPointerDown=t=>{const e=t.target;if(!(e instanceof HTMLElement)||"calcite-button"===e?.tagName?.toLowerCase())return;this.removeHandles(H),t.preventDefault(),t.stopPropagation();const i="test"!==process.env.NODE_ENV;i&&e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)}),o(e,["pointerup","pointercancel"],o=>{this.removeHandles(H),i&&e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()}),o(e,"touchstart",t=>t.preventDefault())],H)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),i=o.length,n=o.indexOf(t);if(-1===n)return void this.exitInputMode();const s=((n+("commit-and-next"===e?1:-1))%i+i)%i;O(o.at(s))},this._onKeyDown=t=>{switch(t.code){case _.next:return this._onNextKey(t);case _.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.toolOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:c(t,e,"abbr")}),{inputUnits:o}=this.info.toolOptions.values,i=f(this.tooltip.view),n=o.length??i,s=o.verticalLength??i,r=o.area??i;return{length:e(u(n)),verticalLength:e(d(s)),area:e(p(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,toolOptions:this.info.toolOptions,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.toolOptions.tooltips,e=this._renderedContent,o=this._renderedActions,i=this._renderedHelpMessage,n=e.length>0,s=n||!!i,r="input"===this.mode;return k("div",{class:E(I,r&&w),tabIndex:-1,onkeydown:this._onKeyDown},r&&s&&t.header?k("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},k("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",scale:"s",tabIndex:-1,onclick:this._onDiscard}),o.length>0?k(x,null,k("div",{class:v,key:"spacer"}),k("div",{class:b,key:"actions"},o)):null):null,n?k("div",{class:g,key:"content"},...e):null,i)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return j({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){n(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const i=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),i instanceof HTMLElement&&i.focus()}catch(e){n(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),i=e.at(-1);o&&i&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),O(i)):document.activeElement===i&&(t.preventDefault(),t.stopPropagation(),O(o)))}get _renderedContent(){return S(this._renderContent())}get _renderedActions(){return S(this._renderActions())}get _renderedHelpMessage(){const{toolOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const i=t.tooltips.helpMessageIcon??"information";return k("div",{class:D,key:"help-message"},i?k("calcite-icon",{class:C,icon:i,scale:"s"}):null,k("div",{class:A},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),s(e);const o=this._getFocusableInputs(),i=t?o.find(e=>e.getAttribute("data-field-name")===t):o.at(0);await O(i)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const i=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if("test"===process.env.NODE_ENV||!this.domNode?.firstChild||!document.startViewTransition||e())return void await i();this.autoRenderingEnabled=!1;const n=this._transitionInfo={transition:document.startViewTransition(async()=>{this.destroyed||n!==this._transitionInfo||(this.autoRenderingEnabled=!0,await i())}),mode:t};try{await n.transition.finished}finally{n===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(P);await a()}_getFocusableInputs(){return Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[])}_getFocusableElements(){const t=this.domNode?.querySelector(`.${M}`);return[...Array.from(t?.querySelectorAll(`.${b} calcite-button:not([disabled])`)??[]),...this._getFocusableInputs()]}};async function O(t){await(t?.componentOnReady?.()),await(t?.setFocus())}function S(t){return(Array.isArray(t)?t:[t]).flat(10).filter(t=>!!t)}t([T("esri/core/t9n/Units"),h()],N.prototype,"_messagesUnits",void 0),t([T("esri/views/interactive/tooltip/t9n/Tooltip"),h()],N.prototype,"_messagesTooltip",void 0),t([h()],N.prototype,"info",void 0),t([h()],N.prototype,"tooltip",void 0),t([h()],N.prototype,"_mode",void 0),t([h()],N.prototype,"mode",null),t([h()],N.prototype,"_displayUnits",null),t([h()],N.prototype,"_inputUnitInfos",null),t([h()],N.prototype,"_formatters",null),t([h()],N.prototype,"fieldContext",null),t([h()],N.prototype,"_renderedContent",null),t([h()],N.prototype,"_renderedActions",null),t([h()],N.prototype,"_renderedHelpMessage",null),t([h()],N.prototype,"_defaultHelpMessage",null),N=t([m("esri.views.interactive.tooltip.content.TooltipContent")],N);const P=20;export{N as TooltipContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as o}from"tslib";import{subclass as e}from"../../../../core/accessorSupport/decorators.js";import{DrawHeaderActions as t}from"../components/DrawHeaderActions.js";import{Fields as i}from"./Fields.js";import{TooltipContent as n}from"./TooltipContent.js";import{tsx as r}from"../../../../widgets/support/widget.js";let s=class extends n{_renderContent(){const{fieldContext:o,info:e,mode:t}=this,{xyMode:n,visibleElements:s}=e;return r(i,{context:o,fields:[..."direction-distance"===n?[s.direction?e.direction:void 0,s.distance?e.distance:void 0]:[s.coordinates?e.effectiveX:void 0,s.coordinates?e.effectiveY:void 0],s.elevation?e.elevation:void 0,s.area?e.area:void 0],mode:t})}_renderActions(){const{xyMode:o,toolOptions:e}=this.info;return r(t,{toolOptions:e,visibleElements:{direction:"direction-distance"===o}})}};s=o([e("esri.views.interactive.tooltip.content.TooltipContentDrawPolygon")],s);export{s as TooltipContentDrawPolygon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as o}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{DrawHeaderActions as e}from"../components/DrawHeaderActions.js";import{Fields as i}from"./Fields.js";import{TooltipContent as n}from"./TooltipContent.js";import{tsx as r}from"../../../../widgets/support/widget.js";let s=class extends n{_renderContent(){const{fieldContext:o,info:t,mode:e}=this,{xyMode:n,visibleElements:s}=t;return r(i,{context:o,fields:[..."direction-distance"===n?[s.direction?t.direction:void 0,s.distance?t.distance:void 0]:[s.coordinates?t.effectiveX:void 0,s.coordinates?t.effectiveY:void 0],s.elevation?t.elevation:void 0,s.totalLength?t.totalLength:void 0],mode:e})}_renderActions(){const{xyMode:o,toolOptions:t}=this.info;return r(e,{toolOptions:t,visibleElements:{direction:"direction-distance"===o}})}};s=o([t("esri.views.interactive.tooltip.content.TooltipContentDrawPolyline")],s);export{s as TooltipContentDrawPolyline};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{when as e}from"../../../../core/reactiveUtils.js";import{subclass as
|
|
2
|
+
import{__decorate as t}from"tslib";import{when as e}from"../../../../core/reactiveUtils.js";import{subclass as o}from"../../../../core/accessorSupport/decorators.js";import{notAvailableString as i}from"../constants.js";import{DrawHeaderActions as n}from"../components/DrawHeaderActions.js";import{TooltipEditableField as r}from"../components/TooltipEditableField.js";import{TooltipField as s}from"../components/TooltipField.js";import{ValueByValue as l}from"../components/ValueByValue.js";import{TooltipContent as d}from"./TooltipContent.js";import{tsx as f,tsxFragment as m}from"../../../../widgets/support/widget.js";let p=class extends d{initialize(){this.addHandles(e(()=>this.info&&this._messagesUnits&&this._messagesTooltip&&this.fieldContext,()=>this.info.renderContext=this.fieldContext),{once:!0})}destroy(){this.info&&(this.info.renderContext=null)}_renderContent(){const{fieldContext:t,info:e,mode:o}=this,n=e.fieldsGroupedForDisplay;return n.length?f(m,null,n.map(e=>{if("left"in e&&(e.left.readOnly&&e.right.readOnly||"feedback"===o)){const o="string"==typeof e.left.title?e.left.title:e.left.title(t);return f(s,{title:o,value:f(l,{left:e.left.getFormattedValue(t)??i,right:e.right.getFormattedValue(t)??i})})}return"left"in e?f(m,null,f(r,{context:t,field:e.left,key:e.left.id,mode:o}),f(r,{context:t,field:e.right,key:e.right.id,mode:o})):f(r,{context:t,field:e,key:e.id,mode:o})})):null}_renderActions(){const{xyMode:t,toolOptions:e}=this.info,o=this.info.allFields.some(t=>"direction"===t.name);return f(n,{toolOptions:e,visibleElements:{direction:"direction-distance"===t&&o}})}};p=t([o("esri.views.interactive.tooltip.content.TooltipContentDynamic")],p);export{p as TooltipContentDynamic};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{zeroSquareMeters as t,toUnit as e,createScalar as a,zeroMeters as n,zeroDegrees as r,createAngle as i,createLength as o,createArea as s}from"../../../../core/quantity.js";import{makeQuantityParser as u,formatLongitudeDecimalDegreesForInputMode as f,makeCoordinateExpressionParser as
|
|
2
|
+
import{zeroSquareMeters as t,toUnit as e,createScalar as a,zeroMeters as n,zeroDegrees as r,createAngle as i,createLength as o,createArea as s}from"../../../../core/quantity.js";import{makeQuantityParser as u,formatLongitudeDecimalDegreesForInputMode as f,makeCoordinateExpressionParser as l,formatLatitudeDecimalDegreesForInputMode as c,sanitizeAngle as m,parseLongitude as p,parseLatitude as g}from"./parsingAndFormattingUtils.js";import{TooltipField as d}from"./TooltipField.js";import{TooltipFieldElevation as h}from"./TooltipFieldElevation.js";import{TooltipFieldOrientation as b}from"./TooltipFieldOrientation.js";import{TooltipFieldSize as I}from"./TooltipFieldSize.js";import{getNormalizedDirection as v}from"../../../support/angularMeasurementUtils.js";function y(t){const a=t=>t.inputUnitInfos.angle.unit,n=t=>t.toolOptions.values.effectiveDirectionMode;return new d({name:"direction",actual:r,parse:u({createQuantity:(t,e)=>i(t,a(e),"geographic"),sanitize:m}),format:(t,e)=>{const a=n(e),r=v(t,a);switch(a){case"absolute":return e.formatters.direction(r);case"relative":return e.formatters.directionRelative(r);case"relative-bilateral":return e.formatters.directionRelativeBilateral(r)}},formatForInputMode:(t,r)=>{const i=v(t,n(r));return r.formatters.scalar(e(i,a(r)))},suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>{const e=n(t),{absolute:a,relative:r}=t.messages.sketch.direction;switch(e){case"absolute":return a;case"relative":case"relative-bilateral":return r}},...t})}function U(t){const a=t=>t.inputUnitInfos.length.unit;return new d({name:t?.name??"distance",actual:n,parse:u({createQuantity:(t,e)=>o(Math.max(t,0),a(e))}),format:(t,e)=>e.formatters.length(t),formatForInputMode:(t,n)=>n.formatters.scalar(e(t,a(n))),suffix:t=>t.inputUnitInfos.length.abbreviation,title:t=>t.messages.sketch.distance,...t})}function w(t){const a=t=>t.inputUnitInfos.length.unit;return new d({name:t?.name??"radius",actual:n,parse:u({createQuantity:(t,e)=>o(Math.max(t,0),a(e))}),format:(t,e)=>e.formatters.length(t),formatForInputMode:(t,n)=>n.formatters.scalar(e(t,a(n))),suffix:t=>t.inputUnitInfos.length.abbreviation,title:t=>t.messages.sketch.radius,...t})}function x(t){return U({format:(t,e)=>e.formatters.totalLength(t),title:t=>t.messages.sketch.totalLength,readOnly:!0,...t})}function F(t){return U({...t})}function M(t){const e=t=>t.inputUnitInfos.length.unit;return U({...t,parse:u({createQuantity:(t,a)=>o(t,e(a))}),format:(t,e)=>e.formatters.lengthRelative(t)})}function k(t){return new h(t)}function j(t){return new b(t)}function Q(t){return new I(t)}function D(t){return A("scale",{name:"scale",actual:null,parse:u({createQuantity:t=>a(Math.abs(t))}),...t})}function O(a){const n=t=>t.inputUnitInfos.area.unit;return new d({name:"area",actual:t,parse:u({createQuantity:(t,e)=>s(t,n(e))}),format:(t,e)=>e.formatters.area(t),formatForInputMode:(t,a)=>a.formatters.scalar(e(t,n(a))),suffix:t=>t.inputUnitInfos.area.abbreviation,title:t=>t.messages.sketch.area,readOnly:!0,...a})}function T(t){return new d({name:"x",actual:r,parse:l(p),format:(t,e)=>e.formatters.longitudeDecimalDegrees(t),formatForInputMode:t=>f(t),suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>t.messages.sketch.longitude,...t})}function R(t){return new d({name:"y",actual:r,parse:l(g),format:(t,e)=>e.formatters.latitudeDecimalDegrees(t),formatForInputMode:t=>c(t),suffix:t=>t.inputUnitInfos.angle.abbreviation,title:t=>t.messages.sketch.latitude,...t})}function z(t){return A("x",{name:"x",...t})}function L(t){return A("y",{name:"y",...t})}function q(t){return new d({actual:a(0),parse:u({createQuantity:t=>a(t)}),format:(t,e)=>e.formatters.scalar(t),formatForInputMode:(t,e)=>e.formatters.scalar(t),title:t=>t.messages.sketch.scale,...t})}function A(t,e){return q({title:e=>e.messages.sketch[t],...e})}export{O as makeAreaField,y as makeDirectionField,F as makeDistanceField,k as makeElevationField,R as makeLatitudeField,U as makeLengthField,T as makeLongitudeField,j as makeOrientationField,w as makeRadiusField,M as makeRelativeDistanceField,q as makeScalarField,D as makeScaleField,Q as makeSizeField,x as makeTotalLengthField,z as makeXField,L as makeYField};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>n(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>r(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>r(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(n):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.
|
|
2
|
+
import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>n(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>r(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>r(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(n):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.toolOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function r(e,t){return e.displayOrder-t.displayOrder}function n(e){return"direction"!==e.name&&"distance"!==e.name}function a(e){return"x"!==e.name&&"y"!==e.name}function d(e,t){const{name:i,role:s}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==s))??[]}function p(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([i()],o.prototype,"type",void 0),e([i()],o.prototype,"getAllFields",void 0),e([i()],o.prototype,"getActiveHandle",void 0),e([i()],o.prototype,"getHelpMessageKey",void 0),e([i()],o.prototype,"availableFields",null),e([i()],o.prototype,"availableFieldsForCurrentHandle",null),e([i()],o.prototype,"allManagedFields",null),e([i()],o.prototype,"fieldsGroupedForDisplay",null),e([i()],o.prototype,"xyMode",null),e([i()],o.prototype,"allFields",null),e([i()],o.prototype,"renderContext",void 0),e([i()],o.prototype,"helpMessage",void 0),o=e([s("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],o);export{o as DynamicTooltipInfo,p as isKnownConstraintField};
|
|
@@ -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"../../../../core/Accessor.js";import{property as o,subclass as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{property as o,subclass as l}from"../../../../core/accessorSupport/decorators.js";let i=class extends t{constructor(e){super(e),this.helpMessage=void 0,this.viewType=void 0}get visibleElements(){return this.toolOptions.tooltips.visibleElements}get allFields(){return[]}get editableFields(){return this.allFields.filter(e=>e.visible&&!e.readOnly)}clearInputValues(){this.allFields.forEach(e=>e.clearInputValue())}};e([o()],i.prototype,"toolOptions",void 0),e([o()],i.prototype,"visibleElements",null),e([o()],i.prototype,"helpMessage",void 0),e([o()],i.prototype,"viewType",void 0),e([o()],i.prototype,"allFields",null),e([o()],i.prototype,"editableFields",null),i=e([l("esri.views.interactive.tooltip.infos.SketchTooltipInfo")],i);export{i as SketchTooltipInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{createTask as t}from"../../../core/asyncUtils.js";import{handlesGroup as o,makeHandle as e}from"../../../core/handleUtils.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{createAngle as r,createScalar as i,valueInUnit as l}from"../../../core/quantity.js";import{watch as a}from"../../../core/reactiveUtils.js";import{verticalLengthUnitFromSpatialReference as s}from"../../../core/units.js";import{scale as u,equals as c,negate as p}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as f,ONES as m,create as d,UNIT_Z as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoaded as y,load as v}from"../../../geometry/coordinateFormatter.js";import x from"../../../geometry/support/MeshTransform.js";import{isRelativeVertexSpace as j}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isWebMercator as b}from"../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as h}from"../../../geometry/support/webMercatorUtils.js";import{tooltipKeys as S}from"../keybindings.js";import U from"../Tooltip.js";import{parseLatitudeLongitude as w,parseXY as A}from"./fields/parsingAndFormattingUtils.js";import{getDegreesArithmetic as M,getDegreesGeographic as R}from"../../support/angularMeasurementUtils.js";function V(t){const o=new U(t());return o.addHandles(a(()=>t(),({view:t,options:e,info:n})=>{o.view=t,void 0!==e&&(o.options=e),void 0!==n&&(o.info=n)})),o}function
|
|
2
|
+
import{createTask as t}from"../../../core/asyncUtils.js";import{handlesGroup as o,makeHandle as e}from"../../../core/handleUtils.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{createAngle as r,createScalar as i,valueInUnit as l}from"../../../core/quantity.js";import{watch as a}from"../../../core/reactiveUtils.js";import{verticalLengthUnitFromSpatialReference as s}from"../../../core/units.js";import{scale as u,equals as c,negate as p}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as f,ONES as m,create as d,UNIT_Z as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoaded as y,load as v}from"../../../geometry/coordinateFormatter.js";import x from"../../../geometry/support/MeshTransform.js";import{isRelativeVertexSpace as j}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isWebMercator as b}from"../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as h}from"../../../geometry/support/webMercatorUtils.js";import{tooltipKeys as S}from"../keybindings.js";import U from"../Tooltip.js";import{parseLatitudeLongitude as w,parseXY as A}from"./fields/parsingAndFormattingUtils.js";import{getDegreesArithmetic as M,getDegreesGeographic as R}from"../../support/angularMeasurementUtils.js";function V(t){const o=new U(t());return o.addHandles(a(()=>t(),({view:t,options:e,info:n})=>{o.view=t,void 0!==e&&(o.options=e),void 0!==n&&(o.info=n)})),o}function z(t,o){const e=j(o.vertexSpace),{scale:n,orientation:l}=t,{transform:a}=o,s=T(a);e&&null!=s?(l.actual=r(s,"degrees","arithmetic"),l.visible=!0):(l.actual=null,l.visible=!1),e?(n.actual=i(H(a)),n.visible=!0):(n.actual=null,n.visible=!1)}function D(t,o,e){if(!o||!j(o.vertexSpace))return;const n=o.transform??=new x;P(t,n,e),k(t,n,e)}function P(t,o,e){const r=M(t.orientation.actual),i=q(o.rotationAxis);if(null==r||null==i)return;const l=r-90,a=o.rotationAngle,s=l*i,u=s-a;n(a,s)||(e?.onRotateStart(0),o.rotationAngle=s,e?.onRotate(u),e?.onRotateStop(u))}function k(t,o,e){const n=t.scale.actual?.value,r=H(o);if(null==n||n===r)return;const{scale:i}=o;let l;if(0===r)l=f(m);else{const t=n/r;l=u(d(),i,t)}e?.onScaleStart(i[0],i[1],i[2]),o.scale=l,e?.onScale(l[0],l[1],l[2]),e?.onScaleStop(l[0],l[1],l[2])}function F(t,o){const{x:e,y:r,z:i}=o,{x:l,y:a,z:s}=E(t,o.spatialReference);return{dx:null==l||n(l,e)?0:l-e,dy:null==a||n(a,r)?0:a-r,dz:null==s||null==i||n(s,i)?0:s-i}}function E(t,o){let e,n;t.geographic?(e=R(t.longitude.actual),n=R(t.latitude.actual),b(o)&&(null!=e&&null!=n?[e,n]=h(e,n,I):null!=e?e=h(e,0,I)[0]:null!=n&&(n=h(0,n,I)[1]))):(e=t.x.actual?.value,n=t.y.actual?.value);const r=t.elevation.actual,i=s(o);return{x:e,y:n,z:null!=i&&null!=r?l(r,i):void 0}}const I=[0,0];function T(t){const o=90;if(!t)return o;const e=q(t.rotationAxis)??1;return null!=e?o+e*t.rotationAngle:null}function q(t){return c(t,g)?1:c(t,B)?-1:null}const B=p(d(),g);function H(t){return t?Math.max(...t.scale):1}function O(t,o){return!("key-down"!==t.type||t.key!==S.enterInputMode||!o||!C(o.info))&&(o.enterInputMode(),t.preventDefault(),t.stopPropagation(),!0)}function C(t){const o=t?.toolOptions;if(!o)return!1;const{inputEnabled:e,visibleElements:n}=o.tooltips;return e&&!0===t.editableFields.some(({name:t})=>"x"===t||"y"===t?n.coordinates:!t||n[t])}function G(n,r){let i=null;return o([n.on("paste",o=>{i?.abort(),i=t(async()=>{y()||await v(),J(o,n.info,r)})}),t(()=>v()),e(()=>i?.abort())])}function J(t,o,e){if(!o||!("geographic"in o))return;const n=t.clipboardData?.getData("text");if(!n)return;const r=o=>{t.stopPropagation(),t.preventDefault(),e?.onBeforePaste(),o(),e?.onAfterPaste()};if(o.geographic){const t=w(n);t&&r(()=>{o.longitude.applyValue(t.longitude),o.latitude.applyValue(t.latitude)})}else{const t=A(n);t&&r(()=>{o.x.applyValue(t.x),o.y.applyValue(t.y)})}}export{G as connectPasteEvent,O as enterInputModeIfAvailable,F as getXYZDeltasFromTooltipInfo,C as isInputModeAvailable,V as makeTooltip,J as pasteLocation,D as updateMeshTransformFromTooltipInfo,z as updateTooltipInfoFromMeshTransform};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import o from"../../core/Collection.js";import{EventedAccessor as r}from"../../core/Evented.js";import{makeHandle as s}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{abortMaybe as n}from"../../core/maybe.js";import{debounce as l,onAbort as c,ignoreAbortErrors as a}from"../../core/promiseUtils.js";import{on as p}from"../../core/reactiveUtils.js";import{createScreenPoint as d}from"../../core/screenUtils.js";import{property as h,subclass as m}from"../../core/accessorSupport/decorators.js";import y from"../../geometry/Point.js";import u from"../../geometry/Polygon.js";import{isClockwise as v}from"../../geometry/support/coordsUtils.js";import{sketchKeys as _,selectionKeys as g}from"../interactive/keybindings.js";import{getSelectionFromGeometry as f}from"../../widgets/support/Selector2D/selectorUtils.js";import{getSelectionFromScreenSelector as w}from"../../widgets/support/Selector3D/selectorUtils.js";let T=class extends r{constructor(e){super(e),this._completed=!1,this._isConstraintKeyDown=!1,this._processTask=null,this.createTool="rectangle",this.mode=null,this.persistSelection=!0,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selection=new o,this.selectionManager=null,this.selectOnComplete=!0,this.sources=null,this.toolName="",this.type="add",this._process=l(async(e,o)=>{const{callback:r,completed:s}=e,i=t(async t=>{const{effectiveSelectionManager:o,returnFeatureTitleFields:i,returnGeometry:n,selection:l,sources:c,view:a}=this;if(!c?.length&&!o.sources.length||!a)return void l.removeAll();const p="3d"===a.type&&"screenSelector"in e&&e.screenSelector&&null!=c?await w({selector:e.screenSelector,signal:t,sources:c,view:a}):"selector"in e&&e.selector&&null!=c?await f({returnFeatureTitleFields:i,returnGeometry:n,selector:e.selector,signal:t,sources:c,view:a}):[];if(l.removeAll(),l.addMany(p),s&&this.persistSelection)switch(this.effectiveType){case"remove":o.updateSelection({current:[],added:[],removed:p});break;case"replace":o.clear(),o.updateSelection({current:p,added:[],removed:[]});break;default:o.updateSelection({current:p,added:[],removed:[]})}r?.()});return c(o,()=>i.abort()),this._processTask=i,i.promise},S),this._onOperationFinish=this._onOperationFinish.bind(this)}initialize(){this._setup()}get _defaultMode(){return"polygon"===this.createTool?"click":"hybrid"}get _selectionArea(){const e=this._tool.coordinates;if(0===e.length)return;const t=d(),o=this.view.spatialReference,r=e=>{t.x=e[0],t.y=e[1];const o=this.view.toMap(t);return[o?.x??0,o?.y??0]};if(1===e.length||e.every(([t,o])=>t===e[0][0]&&o===e[0][1])){const[t,s]=r(e[0]);return new y({x:t,y:s,spatialReference:o})}const s=e.map(r);if(0===s.length)return;v(s)||s.reverse();return new u({spatialReference:o,rings:[s]})}get _screenSelector(){const e=this._tool.coordinates;if(0===e.length)return;const t=e=>d(e[0],e[1]);return 1===e.length||e.every(([t,o])=>t===e[0][0]&&o===e[0][1])?t(e[0]):e.map(t)}get completed(){return this._completed}get effectiveSelectionManager(){return this.selectionManager??this.view.selectionManager}get effectiveType(){const e=this.type??"add";if(this._isConstraintKeyDown)switch(e){case"add":return"remove";case"remove":case"replace":return"add";default:return e}return e}get processingFinalSelection(){return!(!this._processTask||!this._tool?.drawOperation?.isCompleted)}cancel(){this.selection.removeAll(),this._onOperationFinish(!0)}destroy(){this._toolImportController=n(this._toolImportController)}async _setup(){const{createTool:e,view:t}=this;if(await t.whenReady(),this.destroyed||this._toolImportController)return;const o=new AbortController;this._toolImportController=o;const r=await(import("../draw/DrawScreenTool.js"));if(o.signal.aborted)return;const n=Symbol();try{this._tool=new r.DrawScreenTool({view:t,mode:this.mode??this._defaultMode,geometryType:e,cursor:"point"===e?"default":"crosshair"})}finally{this._toolImportController=null}this._tool?(this.selectOnComplete||this.addHandles(this._tool.on(["cursor-update","vertex-add","vertex-remove"],()=>{this._syncConstraintKeyDown(),a(this._process(this._selectionProcessParams))}),n),this._syncConstraintKeyDown(),this.addHandles([p(()=>t,"key-down",e=>{if(!e.repeat)switch(this._syncConstraintKeyDown(),e.key){case _.constraint:this._tool.uniformSizeToggled=!0,e.stopPropagation();break;case _.center:this._tool.centeredToggled=!0,e.stopPropagation()}}),p(()=>t,"key-up",e=>{switch(this._syncConstraintKeyDown(),e.key){case _.constraint:this._tool.uniformSizeToggled=!1,e.stopPropagation();break;case _.center:this._tool.centeredToggled=!1,e.stopPropagation()}}),this.selection.on("change",({added:e,removed:t})=>this.emit("selection-change",{operationType:this.effectiveType,added:e,removed:t})),this._tool.on("complete",async e=>{this._syncConstraintKeyDown(),this.removeHandles(n),e.aborted?this.cancel():(this._tool.cursor="progress",await this._process({...this._selectionProcessParams,callback:this._onOperationFinish,completed:!0}))})],n),this.addHandles(s(()=>t.tools.remove(this._tool))),t.addAndActivateTool(this._tool)):i.getLogger(this).warn("Unable to import Draw module. SelectionOperation failed to load.")}_syncConstraintKeyDown(){const{inputManager:e}=this.view;this._isConstraintKeyDown=g.invertType.some(t=>e.isModifierKeyDown(t))}get _selectionProcessParams(){return"3d"===this.view.type?{screenSelector:this._screenSelector}:{selector:this._selectionArea}}_onOperationFinish(e=!1){this.removeAllHandles(),this._processTask?.abort(),this._completed=!0,this.emit("complete",{aborted:e,operationType:this.effectiveType,selection:this.selection.toArray(),toolName:this.toolName})}};e([h()],T.prototype,"_completed",void 0),e([h()],T.prototype,"_defaultMode",null),e([h()],T.prototype,"_isConstraintKeyDown",void 0),e([h()],T.prototype,"_processTask",void 0),e([h()],T.prototype,"_selectionArea",null),e([h()],T.prototype,"_screenSelector",null),e([h()],T.prototype,"completed",null),e([h({constructOnly:!0})],T.prototype,"createTool",void 0),e([h()],T.prototype,"effectiveSelectionManager",null),e([h()],T.prototype,"effectiveType",null),e([h({constructOnly:!0})],T.prototype,"mode",void 0),e([h()],T.prototype,"persistSelection",void 0),e([h()],T.prototype,"processingFinalSelection",null),e([h()],T.prototype,"returnFeatureTitleFields",void 0),e([h()],T.prototype,"returnGeometry",void 0),e([h({readOnly:!0})],T.prototype,"selection",void 0),e([h({constructOnly:!0})],T.prototype,"selectionManager",void 0),e([h({constructOnly:!0})],T.prototype,"selectOnComplete",void 0),e([h()],T.prototype,"sources",void 0),e([h({constructOnly:!0})],T.prototype,"toolName",void 0),e([h()],T.prototype,"type",void 0),e([h({constructOnly:!0})],T.prototype,"view",void 0),T=e([m("esri.views.selection.SelectionOperation")],T);const S=100,C=T;export{C as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import o from"../../core/Collection.js";import{EventedAccessor as r}from"../../core/Evented.js";import{makeHandle as s}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{abortMaybe as n}from"../../core/maybe.js";import{debounce as l,onAbort as c,ignoreAbortErrors as a}from"../../core/promiseUtils.js";import{on as p}from"../../core/reactiveUtils.js";import{createScreenPoint as d}from"../../core/screenUtils.js";import{property as h,subclass as m}from"../../core/accessorSupport/decorators.js";import y from"../../geometry/Point.js";import u from"../../geometry/Polygon.js";import{isClockwise as v}from"../../geometry/support/coordsUtils.js";import{sketchKeys as _,selectionKeys as g}from"../interactive/keybindings.js";import{getSelectionFromGeometry as f}from"../../widgets/support/Selector2D/selectorUtils.js";import{getSelectionFromScreenSelector as w}from"../../widgets/support/Selector3D/selectorUtils.js";let T=class extends r{constructor(e){super(e),this._completed=!1,this._isConstraintKeyDown=!1,this._processTask=null,this.createTool="rectangle",this.mode=null,this.persistSelection=!0,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selection=new o,this.selectionManager=null,this.selectOnComplete=!0,this.sources=null,this.toolName="",this.type="add",this._process=l(async(e,o)=>{const{callback:r,completed:s}=e,i=t(async t=>{const{effectiveSelectionManager:o,returnFeatureTitleFields:i,returnGeometry:n,selection:l,sources:c,view:a}=this;if(!c?.length&&!o.sources.length||!a)return void l.removeAll();const p="3d"===a.type&&"screenSelector"in e&&e.screenSelector&&null!=c?await w({selector:e.screenSelector,signal:t,sources:c,view:a}):"selector"in e&&e.selector&&null!=c?await f({returnFeatureTitleFields:i,returnGeometry:n,selector:e.selector,signal:t,sources:c,view:a}):[];if(l.removeAll(),l.addMany(p),s&&this.persistSelection)switch(this.effectiveType){case"remove":o.updateSelection({current:[],added:[],removed:p});break;case"replace":o.clear(),o.updateSelection({current:p,added:[],removed:[]});break;default:o.updateSelection({current:p,added:[],removed:[]})}r?.()});return c(o,()=>i.abort()),this._processTask=i,i.promise},S),this._onOperationFinish=this._onOperationFinish.bind(this)}async initialize(){await this._setup()}get _defaultMode(){return"polygon"===this.createTool?"click":"hybrid"}get _selectionArea(){const e=this._tool.coordinates;if(0===e.length)return;const t=d(),o=this.view.spatialReference,r=e=>{t.x=e[0],t.y=e[1];const o=this.view.toMap(t);return[o?.x??0,o?.y??0]};if(1===e.length||e.every(([t,o])=>t===e[0][0]&&o===e[0][1])){const[t,s]=r(e[0]);return new y({x:t,y:s,spatialReference:o})}const s=e.map(r);if(0===s.length)return;v(s)||s.reverse();return new u({spatialReference:o,rings:[s]})}get _screenSelector(){const e=this._tool.coordinates;if(0===e.length)return;const t=e=>d(e[0],e[1]);return 1===e.length||e.every(([t,o])=>t===e[0][0]&&o===e[0][1])?t(e[0]):e.map(t)}get completed(){return this._completed}get effectiveSelectionManager(){return this.selectionManager??this.view.selectionManager}get effectiveType(){const e=this.type??"add";if(this._isConstraintKeyDown)switch(e){case"add":return"remove";case"remove":case"replace":return"add";default:return e}return e}get processingFinalSelection(){return!(!this._processTask||!this._tool?.drawOperation?.isCompleted)}cancel(){this.selection.removeAll(),this._onOperationFinish(!0)}destroy(){this._toolImportController=n(this._toolImportController)}async _setup(){const{createTool:e,view:t}=this;if(await t.whenReady(),this.destroyed||this._toolImportController)return;const o=new AbortController;this._toolImportController=o;const r=await(import("../draw/DrawScreenTool.js"));if(o.signal.aborted)return;const n=Symbol();try{this._tool=new r.DrawScreenTool({view:t,mode:this.mode??this._defaultMode,geometryType:e,cursor:"point"===e?"default":"crosshair"})}finally{this._toolImportController=null}this._tool?(this.selectOnComplete||this.addHandles(this._tool.on(["cursor-update","vertex-add","vertex-remove"],()=>{this._syncConstraintKeyDown(),a(this._process(this._selectionProcessParams))}),n),this._syncConstraintKeyDown(),this.addHandles([p(()=>t,"key-down",e=>{if(!e.repeat)switch(this._syncConstraintKeyDown(),e.key){case _.constraint:this._tool.uniformSizeToggled=!0,e.stopPropagation();break;case _.center:this._tool.centeredToggled=!0,e.stopPropagation()}}),p(()=>t,"key-up",e=>{switch(this._syncConstraintKeyDown(),e.key){case _.constraint:this._tool.uniformSizeToggled=!1,e.stopPropagation();break;case _.center:this._tool.centeredToggled=!1,e.stopPropagation()}}),this.selection.on("change",({added:e,removed:t})=>this.emit("selection-change",{operationType:this.effectiveType,added:e,removed:t})),this._tool.on("complete",async e=>{this._syncConstraintKeyDown(),this.removeHandles(n),e.aborted?this.cancel():(this._tool.cursor="progress",await this._process({...this._selectionProcessParams,callback:this._onOperationFinish,completed:!0}))})],n),this.addHandles(s(()=>t.tools.remove(this._tool))),t.addAndActivateTool(this._tool)):i.getLogger(this).warn("Unable to import Draw module. SelectionOperation failed to load.")}_syncConstraintKeyDown(){const{inputManager:e}=this.view;this._isConstraintKeyDown=g.invertType.some(t=>e.isModifierKeyDown(t))}get _selectionProcessParams(){return"3d"===this.view.type?{screenSelector:this._screenSelector}:{selector:this._selectionArea}}_onOperationFinish(e=!1){this.removeAllHandles(),this._processTask?.abort(),this._completed=!0,this.emit("complete",{aborted:e,operationType:this.effectiveType,selection:this.selection.toArray(),toolName:this.toolName})}};e([h()],T.prototype,"_completed",void 0),e([h()],T.prototype,"_defaultMode",null),e([h()],T.prototype,"_isConstraintKeyDown",void 0),e([h()],T.prototype,"_processTask",void 0),e([h()],T.prototype,"_selectionArea",null),e([h()],T.prototype,"_screenSelector",null),e([h()],T.prototype,"completed",null),e([h({constructOnly:!0})],T.prototype,"createTool",void 0),e([h()],T.prototype,"effectiveSelectionManager",null),e([h()],T.prototype,"effectiveType",null),e([h({constructOnly:!0})],T.prototype,"mode",void 0),e([h()],T.prototype,"persistSelection",void 0),e([h()],T.prototype,"processingFinalSelection",null),e([h()],T.prototype,"returnFeatureTitleFields",void 0),e([h()],T.prototype,"returnGeometry",void 0),e([h({readOnly:!0})],T.prototype,"selection",void 0),e([h({constructOnly:!0})],T.prototype,"selectionManager",void 0),e([h({constructOnly:!0})],T.prototype,"selectOnComplete",void 0),e([h()],T.prototype,"sources",void 0),e([h({constructOnly:!0})],T.prototype,"toolName",void 0),e([h()],T.prototype,"type",void 0),e([h({constructOnly:!0})],T.prototype,"view",void 0),T=e([m("esri.views.selection.SelectionOperation")],T);const S=100,C=T;export{C as default};
|
|
@@ -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 r from"../../../core/Accessor.js";import{isSome as o}from"../../../core/arrayUtils.js";import{ClonableMixin as l}from"../../../core/Clonable.js";import a from"../../../core/Collection.js";import{IdentifiableMixin as i}from"../../../core/Identifiable.js";import{ignoreAbortErrors as s,debounce as n}from"../../../core/promiseUtils.js";import{watch as u,initial as d}from"../../../core/reactiveUtils.js";import{property as y,subclass as h}from"../../../core/accessorSupport/decorators.js";import{getFixedFieldName as p,isRelatableFeatureSupportedLayer as c,findRelatedLayer as g}from"../../../popup/support/featureUtils.js";import C from"../../../rest/support/RelationshipQuery.js";import{getFieldsInTitleAndDesc as b}from"../../FeatureForm/featureFormUtils.js";const F=100;let _=class extends(l(i(r))){constructor(e){super(e),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featuresPerPage=10,this.activeCategory=null,this.allCategories=null,this.description=null,this.graphic=null,this.layer=null,this.map=null,this.orderByFields=null,this.featureCount=0,this.relationshipId=null,this.showAllEnabled=!1,this.title=null,this._cancelQuery=()=>{const{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{const{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await s(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const e=new AbortController;this._queryFeatureCountAbortController=e,await s(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{const e=new AbortController;this._queryPageAbortController=e,await s(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=n(this._queryController,F),this._queryFeatureCountDebounced=n(this._queryFeatureCountController,F),this._queryPageDebounced=n(this._queryPageController,F),this._query=async()=>{const{_queryAbortController:e,relatedFeatures:t}=this;this.featureCount&&("subtype-group"!==this.relatedLayer?.type||this.activeCategory)&&(this._destroyRelatedFeatureViewModels(),this.featurePage=1,t.destroyAll(),this.destroyed||t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this.addHandles([u(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),d),u(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),u(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced())])}destroy(){this._destroyRelatedFeatureViewModels(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage()}set featurePage(e){const{featuresPerPage:t,featureCount:r}=this,o=1,l=Math.ceil(r/t)||1;this._set("featurePage",Math.min(Math.max(e,o),l))}get featurePage(){return this._get("featurePage")}get orderByFieldsFixedCasing(){const{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(e=>{const r=e.clone();return r.field=p(e.field,t),r}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get canLoad(){return!!this.map&&null!=this.relationshipId&&"number"==typeof this.objectId}get canQuery(){const e=this.layer?.capabilities?.queryRelated;return!!(this.relatedLayer&&this.relationship&&null!=this.relationshipId&&null!=this.objectId&&e?.supportsCount&&e?.supportsPagination)}get allCategoriesCount(){return this.allCategories?.length??0}get categories(){const{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}set displayCount(e){const t=0,r=10,o=3;this._set("displayCount",Math.min(Math.max(e??o,t),r))}get displayCount(){return this._get("displayCount")}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedFeatures(){return this._get("relatedFeatures")||new a}get relatedLayer(){const{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;const o="subtype-sublayer"===e.type&&e.parent&&c(e.parent)?e.parent:e;return g(t,o,r)??null}get relatedLayerKeyField(){const{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&null!=t?e.relationships?.find(e=>e.id===t)?.keyField:null}get relatedLayerKeyFields(){const{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(e=>e.keyField).filter(o)??[]:[]}get relationship(){const{relationshipId:e,layer:t}=this;return null!=e&&t?.loaded?t.relationships?.find(({id:t})=>t===e)??null:null}get relationshipKey(){const{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get relatedFeatureViewModels(){return this._get("relatedFeatureViewModels")||new a}get state(){const{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:o,_loaded:l,canLoad:a}=this;return t||a&&!l?"loading":e||r?"querying":o?"ready":"disabled"}getRelatedFeatureByObjectId(e){return this.relatedFeatures.find(t=>t.getObjectId()===e)}refresh(){this._queryFeatureCountDebounced()}_destroyRelatedFeatureViewModels(){this.relatedFeatureViewModels?.destroyAll()}async _queryFeatureCount(){const{layer:e,relatedLayer:t}=this;await(e?.load()),await(t?.load());const{_queryFeatureCountAbortController:r,activeCategory:l,canQuery:a,objectId:i,relatedLayerKeyField:s,relationshipId:n,relationshipKey:u,supportsCacheHint:d}=this;if(!a||!e||!t||null==i)return this._set("featureCount",0),void this._set("allCategories",null);if("subtype-group"===t?.type&&!l){if(this._set("featureCount",0),this._destroyRelatedFeatureViewModels(),this.featurePage=1,this.relatedFeatures.destroyAll(),s&&null!=u){const{default:e}=await(import("../../../smartMapping/statistics/uniqueValues.js")),{uniqueValueInfos:l}=await e({layer:t,sqlWhere:`${s} = '${u}'`,field:t.subtypeField,signal:r?.signal}),a=l.map(({count:e,value:r})=>{const o=t.subtypes?.find(e=>e.code===r)?.name;return null!=r&&o?{count:e,value:r,name:o}:void 0}).filter(o);this._set("allCategories",a)}return}const{historicMoment:y,gdbVersion:h}=e,p=new C({cacheHint:d,gdbVersion:h,historicMoment:y,relationshipId:n,returnGeometry:!1,objectIds:[i],where:this._getRelationshipWhereClause(t)}),c=await e.queryRelatedFeaturesCount(p,{signal:r?.signal});this._set("allCategories",null),this._set("featureCount",c[i]||0)}_getRelationshipWhereClause(e){const{activeCategory:t}=this,r=e.createQuery(),o="subtypeField"in e?e.subtypeField:void 0,l=t&&o?`${o} = ${t.value}`:void 0,a=r.where;return a&&l?`(${a}) AND (${l})`:a??l}_sliceFeatures(e){const{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){const{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:o,featureCount:l}=this;!r||t<2||!l||"subtype-group"===this.relatedLayer?.type&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:o?.signal}))}async _queryRelatedFeatures(e){const{displayCount:t,featureCount:r,featurePage:o,featuresPerPage:l,layer:a,orderByFieldsFixedCasing:i,relatedLayer:s,relatedLayerKeyFields:n,relationshipId:u,showAllEnabled:d,supportsCacheHint:y}=this,{canQuery:h,objectId:p}=this;if(!h||!a||!s||null==p)return[];const c=d?((o-1)*l+r)%r:0,g=d?l:t,F=s.objectIdField,_="subtypeField"in s?s.subtypeField:void 0,m=[...i.map(e=>e.field),...b(s),...n,F,_].filter(f),q=i.map(e=>`${e.field} ${e.order}`),{historicMoment:A,gdbVersion:w}=a,P=new C({orderByFields:q,start:c,num:g,outFields:m,cacheHint:y,historicMoment:A,gdbVersion:w,relationshipId:u,returnGeometry:!1,objectIds:[p],where:this._getRelationshipWhereClause(s)}),v=await a.queryRelatedFeatures(P,{signal:e?.signal}),I=v[p]?.features||[];return"subtype-group"===s.type&&_?I.forEach(e=>{const t=e.attributes[_],r=s.findSublayerForSubtypeCode?.(t);e.sourceLayer=r,e.layer=r}):I.forEach(e=>{e.sourceLayer=s,e.layer=s}),I}};function f(e){return null!=e&&""!==e}e([y()],_.prototype,"_loaded",void 0),e([y()],_.prototype,"_queryAbortController",void 0),e([y()],_.prototype,"_queryPageAbortController",void 0),e([y()],_.prototype,"_queryFeatureCountAbortController",void 0),e([y({value:1})],_.prototype,"featurePage",null),e([y()],_.prototype,"featuresPerPage",void 0),e([y({readOnly:!0})],_.prototype,"orderByFieldsFixedCasing",null),e([y({readOnly:!0})],_.prototype,"supportsCacheHint",null),e([y({readOnly:!0})],_.prototype,"canLoad",null),e([y({readOnly:!0})],_.prototype,"canQuery",null),e([y()],_.prototype,"activeCategory",void 0),e([y({readOnly:!0})],_.prototype,"allCategories",void 0),e([y({readOnly:!0})],_.prototype,"allCategoriesCount",null),e([y({readOnly:!0})],_.prototype,"categories",null),e([y()],_.prototype,"description",void 0),e([y({value:3})],_.prototype,"displayCount",null),e([y({type:t})],_.prototype,"graphic",void 0),e([y({readOnly:!0})],_.prototype,"itemDescriptionFieldName",null),e([y()],_.prototype,"layer",void 0),e([y()],_.prototype,"map",void 0),e([y({readOnly:!0})],_.prototype,"objectId",null),e([y({readOnly:!0})],_.prototype,"objectIdField",null),e([y()],_.prototype,"orderByFields",void 0),e([y({readOnly:!0})],_.prototype,"relatedFeatures",null),e([y({readOnly:!0})],_.prototype,"relatedLayer",null),e([y({readOnly:!0})],_.prototype,"relatedLayerKeyField",null),e([y({readOnly:!0})],_.prototype,"relatedLayerKeyFields",null),e([y({readOnly:!0})],_.prototype,"relationship",null),e([y({readOnly:!0})],_.prototype,"relationshipKey",null),e([y({readOnly:!0})],_.prototype,"relationshipKeyField",null),e([y({readOnly:!0})],_.prototype,"featureCount",void 0),e([y({readOnly:!0})],_.prototype,"relatedFeatureViewModels",null),e([y()],_.prototype,"relationshipId",void 0),e([y()],_.prototype,"showAllEnabled",void 0),e([y()],_.prototype,"state",null),e([y()],_.prototype,"title",void 0),_=e([h("esri.widgets.Feature.FeatureRelationship.FeatureRelationshipViewModel")],_);export{_ as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{isSome as o}from"../../../core/arrayUtils.js";import{ClonableMixin as l}from"../../../core/Clonable.js";import a from"../../../core/Collection.js";import{IdentifiableMixin as i}from"../../../core/Identifiable.js";import{ignoreAbortErrors as s,debounce as n}from"../../../core/promiseUtils.js";import{watch as u,initial as d}from"../../../core/reactiveUtils.js";import{property as y,subclass as h}from"../../../core/accessorSupport/decorators.js";import{getFixedFieldName as p,isRelatableFeatureSupportedLayer as c,findRelatedLayer as g}from"../../../popup/support/featureUtils.js";import C from"../../../rest/support/RelationshipQuery.js";import{getFieldsInTitleAndDesc as b}from"../../FeatureForm/featureFormUtils.js";const F=100;let _=class extends(l(i(r))){constructor(e){super(e),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featuresPerPage=10,this.activeCategory=null,this.allCategories=null,this.description=null,this.graphic=null,this.layer=null,this.map=null,this.orderByFields=null,this.featureCount=0,this.relationshipId=null,this.showAllEnabled=!1,this.title=null,this._cancelQuery=()=>{const{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{const{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await s(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const e=new AbortController;this._queryFeatureCountAbortController=e,await s(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{const e=new AbortController;this._queryPageAbortController=e,await s(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=n(this._queryController,F),this._queryFeatureCountDebounced=n(this._queryFeatureCountController,F),this._queryPageDebounced=n(this._queryPageController,F),this._query=async()=>{const{_queryAbortController:e,relatedFeatures:t}=this;this.featureCount&&("subtype-group"!==this.relatedLayer?.type||this.activeCategory)&&(this._destroyRelatedFeatureViewModels(),this.featurePage=1,t.destroyAll(),this.destroyed||t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this.addHandles([u(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced().catch(()=>{}),d),u(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced().catch(()=>{})),u(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced().catch(()=>{}))])}destroy(){this._destroyRelatedFeatureViewModels(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage()}set featurePage(e){const{featuresPerPage:t,featureCount:r}=this,o=1,l=Math.ceil(r/t)||1;this._set("featurePage",Math.min(Math.max(e,o),l))}get featurePage(){return this._get("featurePage")}get orderByFieldsFixedCasing(){const{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(e=>{const r=e.clone();return r.field=p(e.field,t),r}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get canLoad(){return!!this.map&&null!=this.relationshipId&&"number"==typeof this.objectId}get canQuery(){const e=this.layer?.capabilities?.queryRelated;return!!(this.relatedLayer&&this.relationship&&null!=this.relationshipId&&null!=this.objectId&&e?.supportsCount&&e?.supportsPagination)}get allCategoriesCount(){return this.allCategories?.length??0}get categories(){const{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}set displayCount(e){const t=0,r=10,o=3;this._set("displayCount",Math.min(Math.max(e??o,t),r))}get displayCount(){return this._get("displayCount")}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedFeatures(){return this._get("relatedFeatures")||new a}get relatedLayer(){const{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;const o="subtype-sublayer"===e.type&&e.parent&&c(e.parent)?e.parent:e;return g(t,o,r)??null}get relatedLayerKeyField(){const{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&null!=t?e.relationships?.find(e=>e.id===t)?.keyField:null}get relatedLayerKeyFields(){const{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(e=>e.keyField).filter(o)??[]:[]}get relationship(){const{relationshipId:e,layer:t}=this;return null!=e&&t?.loaded?t.relationships?.find(({id:t})=>t===e)??null:null}get relationshipKey(){const{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get relatedFeatureViewModels(){return this._get("relatedFeatureViewModels")||new a}get state(){const{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:o,_loaded:l,canLoad:a}=this;return t||a&&!l?"loading":e||r?"querying":o?"ready":"disabled"}getRelatedFeatureByObjectId(e){return this.relatedFeatures.find(t=>t.getObjectId()===e)}refresh(){this._queryFeatureCountDebounced().catch(()=>{})}_destroyRelatedFeatureViewModels(){this.relatedFeatureViewModels?.destroyAll()}async _queryFeatureCount(){const{layer:e,relatedLayer:t}=this;await(e?.load()),await(t?.load());const{_queryFeatureCountAbortController:r,activeCategory:l,canQuery:a,objectId:i,relatedLayerKeyField:s,relationshipId:n,relationshipKey:u,supportsCacheHint:d}=this;if(!a||!e||!t||null==i)return this._set("featureCount",0),void this._set("allCategories",null);if("subtype-group"===t?.type&&!l){if(this._set("featureCount",0),this._destroyRelatedFeatureViewModels(),this.featurePage=1,this.relatedFeatures.destroyAll(),s&&null!=u){const{default:e}=await(import("../../../smartMapping/statistics/uniqueValues.js")),{uniqueValueInfos:l}=await e({layer:t,sqlWhere:`${s} = '${u}'`,field:t.subtypeField,signal:r?.signal}),a=l.map(({count:e,value:r})=>{const o=t.subtypes?.find(e=>e.code===r)?.name;return null!=r&&o?{count:e,value:r,name:o}:void 0}).filter(o);this._set("allCategories",a)}return}const{historicMoment:y,gdbVersion:h}=e,p=new C({cacheHint:d,gdbVersion:h,historicMoment:y,relationshipId:n,returnGeometry:!1,objectIds:[i],where:this._getRelationshipWhereClause(t)}),c=await e.queryRelatedFeaturesCount(p,{signal:r?.signal});this._set("allCategories",null),this._set("featureCount",c[i]||0)}_getRelationshipWhereClause(e){const{activeCategory:t}=this,r=e.createQuery(),o="subtypeField"in e?e.subtypeField:void 0,l=t&&o?`${o} = ${t.value}`:void 0,a=r.where;return a&&l?`(${a}) AND (${l})`:a??l}_sliceFeatures(e){const{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){const{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:o,featureCount:l}=this;!r||t<2||!l||"subtype-group"===this.relatedLayer?.type&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:o?.signal}))}async _queryRelatedFeatures(e){const{displayCount:t,featureCount:r,featurePage:o,featuresPerPage:l,layer:a,orderByFieldsFixedCasing:i,relatedLayer:s,relatedLayerKeyFields:n,relationshipId:u,showAllEnabled:d,supportsCacheHint:y}=this,{canQuery:h,objectId:p}=this;if(!h||!a||!s||null==p)return[];const c=d?((o-1)*l+r)%r:0,g=d?l:t,F=s.objectIdField,_="subtypeField"in s?s.subtypeField:void 0,m=[...i.map(e=>e.field),...b(s),...n,F,_].filter(f),q=i.map(e=>`${e.field} ${e.order}`),{historicMoment:A,gdbVersion:w}=a,P=new C({orderByFields:q,start:c,num:g,outFields:m,cacheHint:y,historicMoment:A,gdbVersion:w,relationshipId:u,returnGeometry:!1,objectIds:[p],where:this._getRelationshipWhereClause(s)}),v=await a.queryRelatedFeatures(P,{signal:e?.signal}),I=v[p]?.features||[];return"subtype-group"===s.type&&_?I.forEach(e=>{const t=e.attributes[_],r=s.findSublayerForSubtypeCode?.(t);e.sourceLayer=r,e.layer=r}):I.forEach(e=>{e.sourceLayer=s,e.layer=s}),I}};function f(e){return null!=e&&""!==e}e([y()],_.prototype,"_loaded",void 0),e([y()],_.prototype,"_queryAbortController",void 0),e([y()],_.prototype,"_queryPageAbortController",void 0),e([y()],_.prototype,"_queryFeatureCountAbortController",void 0),e([y({value:1})],_.prototype,"featurePage",null),e([y()],_.prototype,"featuresPerPage",void 0),e([y({readOnly:!0})],_.prototype,"orderByFieldsFixedCasing",null),e([y({readOnly:!0})],_.prototype,"supportsCacheHint",null),e([y({readOnly:!0})],_.prototype,"canLoad",null),e([y({readOnly:!0})],_.prototype,"canQuery",null),e([y()],_.prototype,"activeCategory",void 0),e([y({readOnly:!0})],_.prototype,"allCategories",void 0),e([y({readOnly:!0})],_.prototype,"allCategoriesCount",null),e([y({readOnly:!0})],_.prototype,"categories",null),e([y()],_.prototype,"description",void 0),e([y({value:3})],_.prototype,"displayCount",null),e([y({type:t})],_.prototype,"graphic",void 0),e([y({readOnly:!0})],_.prototype,"itemDescriptionFieldName",null),e([y()],_.prototype,"layer",void 0),e([y()],_.prototype,"map",void 0),e([y({readOnly:!0})],_.prototype,"objectId",null),e([y({readOnly:!0})],_.prototype,"objectIdField",null),e([y()],_.prototype,"orderByFields",void 0),e([y({readOnly:!0})],_.prototype,"relatedFeatures",null),e([y({readOnly:!0})],_.prototype,"relatedLayer",null),e([y({readOnly:!0})],_.prototype,"relatedLayerKeyField",null),e([y({readOnly:!0})],_.prototype,"relatedLayerKeyFields",null),e([y({readOnly:!0})],_.prototype,"relationship",null),e([y({readOnly:!0})],_.prototype,"relationshipKey",null),e([y({readOnly:!0})],_.prototype,"relationshipKeyField",null),e([y({readOnly:!0})],_.prototype,"featureCount",void 0),e([y({readOnly:!0})],_.prototype,"relatedFeatureViewModels",null),e([y()],_.prototype,"relationshipId",void 0),e([y()],_.prototype,"showAllEnabled",void 0),e([y()],_.prototype,"state",null),e([y()],_.prototype,"title",void 0),_=e([h("esri.widgets.Feature.FeatureRelationship.FeatureRelationshipViewModel")],_);export{_ as default};
|