@arcgis/core 5.1.0-next.12 → 5.1.0-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/Components/SketchTooltipControls.d.ts +3 -2
- package/applications/Components/SketchTooltipControls.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0184b4c0c92c76c60ab2.js +1 -0
- package/assets/esri/core/workers/chunks/{56a296cb5c1ae1ea5ab2.js → 08616877b58b518e7461.js} +1 -1
- package/assets/esri/core/workers/chunks/089cef7124173a5cd5f9.js +1 -0
- package/assets/esri/core/workers/chunks/{4d438627dd3509f65d5a.js → 0baa0d66003d23cc76a7.js} +1 -1
- package/assets/esri/core/workers/chunks/0e216f0075fd531c3a2b.js +1 -0
- package/assets/esri/core/workers/chunks/{d5314786df52b6be5307.js → 0e6ffb02a929130ddb50.js} +1 -1
- package/assets/esri/core/workers/chunks/{ae0a555b047b11aa68eb.js → 1219b588f983b4f35033.js} +1 -1
- package/assets/esri/core/workers/chunks/{41fe4d8fe97388498f73.js → 13512a23655258fa77f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee34f14bbfe619b85a80.js → 13e913aa5f5113fceb16.js} +1 -1
- package/assets/esri/core/workers/chunks/{d621cdd0aef6d77986f0.js → 1469e6d1d0d4e310b8f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9e90875943703486227.js → 15ba0296403dd4152b88.js} +1 -1
- package/assets/esri/core/workers/chunks/{7595c52b1647f092c61a.js → 16abc548724e428c325a.js} +1 -1
- package/assets/esri/core/workers/chunks/{dddcae86e434d93b10c0.js → 189e22df73414a1a3989.js} +1 -1
- package/assets/esri/core/workers/chunks/{90aeef17af12cfbecb36.js → 1d124a55f6804be19e09.js} +1 -1
- package/assets/esri/core/workers/chunks/{63831996ad82bd3b1ca9.js → 1e29a114c1cfe21121c4.js} +1 -1
- package/assets/esri/core/workers/chunks/{153a9d087e0fe7072af4.js → 1ede5fa7a16839ed9444.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b1e1fb4e9010873c171.js → 1f30558e3ad6ac68bdb8.js} +1 -1
- package/assets/esri/core/workers/chunks/{9c06b803912fcafa7f52.js → 24dd404612c35f6a3fc3.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6e155b42a4a423139e7.js → 27d1f8279df34d8b15b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{401af6d07c9f458ae067.js → 2c69d8bb1c950b95278d.js} +1 -1
- package/assets/esri/core/workers/chunks/{22d12c309af9c19a1a48.js → 2c7e5b78d94e5850537b.js} +1 -1
- package/assets/esri/core/workers/chunks/{120a5fa9b46084cd0c45.js → 2d376f82cdf020e1fca9.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c321c6bc344544ebb51.js → 2d52b137ee64469a46b2.js} +1 -1
- package/assets/esri/core/workers/chunks/2d67ab4927a968d5c8d4.js +1 -0
- package/assets/esri/core/workers/chunks/{5b3f2bad61a0d993bf16.js → 2e63e18df96e5a2461de.js} +1 -1
- package/assets/esri/core/workers/chunks/{d4da3abbd3d88cd63cb9.js → 454150571b5b664b576a.js} +1 -1
- package/assets/esri/core/workers/chunks/4740d319f233b7f528fe.js +1 -0
- package/assets/esri/core/workers/chunks/{78ce6fcb72e97d3dc087.js → 499d594dc0d282dfe777.js} +1 -1
- package/assets/esri/core/workers/chunks/49d58bacb5b397246978.js +1 -0
- package/assets/esri/core/workers/chunks/4ba4aa6c75e3f8950e65.js +1 -0
- package/assets/esri/core/workers/chunks/{61ce373f00a0cad113ed.js → 4f2c29168c9de0b08741.js} +1 -1
- package/assets/esri/core/workers/chunks/{5789898948cc0da78b8b.js → 552e5c413828e181f89a.js} +1 -1
- package/assets/esri/core/workers/chunks/{5210bde0a05ab172ab28.js → 59f955c7d6b0589e7cc6.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fe0bed2a0a9f8eadb28.js → 5a347b1d87eb6f710136.js} +1 -1
- package/assets/esri/core/workers/chunks/5b97cdeb5949822fbef3.js +1 -0
- package/assets/esri/core/workers/chunks/{aa748cdeab2db5eb9d45.js → 5cd614f50e8925eeeaf4.js} +1 -1
- package/assets/esri/core/workers/chunks/{178c91fabf4a87bbb50b.js → 620d7cd0b0885122aa0f.js} +1 -1
- package/assets/esri/core/workers/chunks/6321680c8070dffa3b6c.js +1 -0
- package/assets/esri/core/workers/chunks/6997b4d5bcc9c4755375.js +1 -0
- package/assets/esri/core/workers/chunks/{b79cceeee3ed46f218a0.js → 69ab42b965bccc3bad4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb4c75479cfea67cf8a2.js → 6af14a0217077d9ab47f.js} +1 -1
- package/assets/esri/core/workers/chunks/{672542d0435fbfd0647c.js → 6b3d8280a24f7a3aac40.js} +1 -1
- package/assets/esri/core/workers/chunks/{3d78e9b3c97c0ce21d16.js → 7017c2e621236c7a7da4.js} +1 -1
- package/assets/esri/core/workers/chunks/7407a1e0cef508116a0b.js +1 -0
- package/assets/esri/core/workers/chunks/{da188d0e22ba1639928e.js → 75907e5d009b71ce723b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ab4289195f5e46c6fe8.js → 78936c591fd49ff955a9.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0b8de5b3cfbe9223df6.js → 796f5265747ce8be910e.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac62411b9b4cf85a4722.js → 7a037fbfd91dd22e3bf0.js} +1 -1
- package/assets/esri/core/workers/chunks/{50661f65a9c191f528bc.js → 7ee7529fcbd0d169047c.js} +1 -1
- package/assets/esri/core/workers/chunks/7f60309d211c49721265.js +1 -0
- package/assets/esri/core/workers/chunks/7f9b0ef7f9b3f3fd3df9.js +1 -0
- package/assets/esri/core/workers/chunks/804c31973f7d116523cb.js +1 -0
- package/assets/esri/core/workers/chunks/{82a446e8befe9d29c8f0.js → 822a115c7d718e4e3d2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6789ddaa61e6d8f20d04.js → 8eea620f770576d18809.js} +1 -1
- package/assets/esri/core/workers/chunks/{10c4f5afe14c0addc418.js → 9332db133a0925d522fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc87890d00d6dba979b2.js → 99c9f35a29f9f6c9e4ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{455fbddd814e4681f0c0.js → a5e91cf150f6cf6a5d2a.js} +1 -1
- package/assets/esri/core/workers/chunks/{948ce2c199973f793651.js → a60a84c8c45f6d03443f.js} +1 -1
- package/assets/esri/core/workers/chunks/{eb4a2dc5efdb873a7f25.js → aef2832902b270f1a594.js} +1 -1
- package/assets/esri/core/workers/chunks/{b5fc0a2480a229e8891a.js → b5f291e8ed7f7cac158d.js} +1 -1
- package/assets/esri/core/workers/chunks/bd05e68b00b9878d0266.js +1 -0
- package/assets/esri/core/workers/chunks/{9a43065e51df9c21c9fa.js → bdb4f216ae8881b98604.js} +1 -1
- package/assets/esri/core/workers/chunks/c080e189764d8bb9cf25.js +1 -0
- package/assets/esri/core/workers/chunks/{bf9b2aa2e67ca746ec7c.js → c15f0769a64863cccef0.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5d3dcb490686430c81d.js → c53048b0f153b251d792.js} +1 -1
- package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +1 -0
- package/assets/esri/core/workers/chunks/cf09408cb7729126caae.js +1 -0
- package/assets/esri/core/workers/chunks/e0565849281ffbe8269e.js +1 -0
- package/assets/esri/core/workers/chunks/e1ba6f857ca12f154e77.js +1 -0
- package/assets/esri/core/workers/chunks/{4ef60a76eeca20bcafb1.js → e4f1e584f89ffb86206b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2889e782ed81bb05b9e5.js → e508f8e707eb3207cfcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{2216264b22a605a0f1ce.js → e60684918100666bb892.js} +1 -1
- package/assets/esri/core/workers/chunks/{4550b7620932cd6de20e.js → e94448b371cd17d7a472.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb8530ade7c40a1ed7c4.js → eb9e913fe0dfcc71cf92.js} +1 -1
- package/assets/esri/core/workers/chunks/ede1d1cc2f315a34f4ca.js +1 -0
- package/assets/esri/core/workers/chunks/{a5bd7e5d71cffde68f89.js → ee89564d11c077169b31.js} +1 -1
- package/assets/esri/core/workers/chunks/{b3cc7f6d953bfbc3a70d.js → f62e37863a549f72093c.js} +1 -1
- package/assets/esri/core/workers/chunks/fc98b8351be567d3eb62.js +1 -0
- package/assets/esri/core/workers/chunks/fd5a5b05a1551cdb8c87.js +1 -0
- package/assets/esri/core/workers/chunks/fda0f4469d9cda637af4.js +1 -0
- package/assets/esri/core/workers/chunks/{554f389f99db430b309c.js → ff961bb6d29ab3fe129d.js} +1 -1
- package/assets/esri/themes/base/widgets/_Attribution.scss +4 -2
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
- package/assets/esri/themes/base/widgets/_Grid.scss +8 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/core/Logger.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/has.js +1 -1
- package/core/types.d.ts +5 -0
- package/core/workers/workerFactory.js +1 -1
- package/editing/sharedTemplates/executor/builders/radialLines.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/ImageryLayer.d.ts +1 -1
- package/layers/MapImageLayer.d.ts +1 -1
- package/layers/TileLayer.d.ts +1 -1
- package/layers/WebTileLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/SnappingCandidate.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/support/ControlPointsGeoreference.d.ts +2 -2
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/CornersGeoreference.d.ts +2 -2
- package/layers/support/CornersGeoreference.js +1 -1
- package/layers/support/ExtentAndRotationGeoreference.d.ts +2 -2
- package/layers/support/ExtentAndRotationGeoreference.js +1 -1
- package/layers/support/GeoreferenceBaseMixin.js +2 -0
- package/layers/support/mediaUtils.js +1 -1
- package/layers/support/relativeTimeQueryUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +1 -1
- package/renderers/DotDensityRenderer.d.ts +43 -0
- package/renderers/DotDensityRenderer.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/print.js +1 -1
- package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +20 -10
- package/symbols/FillSymbol3DLayer.d.ts +36 -16
- package/symbols/ObjectSymbol3DLayer.d.ts +28 -6
- package/symbols/PathSymbol3DLayer.d.ts +18 -6
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/support/Symbol3DEmissive.d.ts +9 -9
- package/symbols/support/Symbol3DMaterial.d.ts +8 -8
- package/time/TimeExtent.d.ts +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/SnappingVisualizer2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/Attribution.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/LinkChartView.d.ts +1 -1
- package/views/MapView.d.ts +1 -1
- package/views/SceneView.d.ts +1 -1
- package/views/SelectionManager.d.ts +242 -0
- package/views/View.d.ts +1 -1
- package/views/input/types.d.ts +1 -1
- package/views/interactive/keybindings.js +1 -1
- package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/support/WhereClauseVisitor.js +1 -1
- package/views/selection/types.d.ts +140 -0
- package/views/support/selectionUtils.js +1 -1
- package/views/ui/DefaultUI.d.ts +5 -12
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/types.d.ts +1 -1
- package/webscene/Glow.d.ts +5 -0
- package/webscene/SunLighting.d.ts +20 -2
- package/webscene/VirtualLighting.d.ts +20 -2
- package/widgets/Attribution/AttributionViewModel.d.ts +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +2 -11
- package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/textElementInputUtils.js +2 -0
- package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/constants.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/textElementTemplateUtils.js +2 -0
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.d.ts +9 -3
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -2
- package/widgets/TimeSlider.d.ts +5 -6
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/assets/esri/core/workers/chunks/0485ae33a8b327974751.js +0 -1
- package/assets/esri/core/workers/chunks/0c8a676599821b9871c2.js +0 -1
- package/assets/esri/core/workers/chunks/2b7615cccbaeda1649f3.js +0 -1
- package/assets/esri/core/workers/chunks/2f0ea91afc9aa8ee9cad.js +0 -1
- package/assets/esri/core/workers/chunks/3a850b5e847b6b0ea53f.js +0 -1
- package/assets/esri/core/workers/chunks/449cf6ae6b6e6c2795e5.js +0 -1
- package/assets/esri/core/workers/chunks/529dbf16ffbbd39f3fa2.js +0 -1
- package/assets/esri/core/workers/chunks/58cf3d35771b87bd74e5.js +0 -1
- package/assets/esri/core/workers/chunks/652bb1b53782cdd3103c.js +0 -1
- package/assets/esri/core/workers/chunks/6acab23acf3b044f5215.js +0 -1
- package/assets/esri/core/workers/chunks/6c2a7bac3f8e32c83292.js +0 -1
- package/assets/esri/core/workers/chunks/6d26e5368e8952003669.js +0 -1
- package/assets/esri/core/workers/chunks/7cb6ccee9bcef449caea.js +0 -1
- package/assets/esri/core/workers/chunks/8235b8267489e1213ce8.js +0 -1
- package/assets/esri/core/workers/chunks/879e8439a513cb333b61.js +0 -1
- package/assets/esri/core/workers/chunks/956237a2baa30760c256.js +0 -1
- package/assets/esri/core/workers/chunks/98c3b7d8db53f0b12642.js +0 -1
- package/assets/esri/core/workers/chunks/a027da22acdaa6d6baa3.js +0 -1
- package/assets/esri/core/workers/chunks/b60337c471e2b855d02a.js +0 -1
- package/assets/esri/core/workers/chunks/bd1bbf1820e12d7a27f6.js +0 -1
- package/assets/esri/core/workers/chunks/c546c49960eace69d20a.js +0 -1
- package/assets/esri/core/workers/chunks/c88101cb8301f095d037.js +0 -1
- package/assets/esri/core/workers/chunks/c9067667290e93407dd7.js +0 -1
- package/assets/esri/core/workers/chunks/e4eb14952b7660feecc7.js +0 -1
- package/assets/esri/core/workers/chunks/e71d08c6f545c2c70174.js +0 -1
- package/assets/esri/core/workers/chunks/f347dee99faa9ee5eef1.js +0 -1
- package/layers/support/GeoreferenceBase.d.ts +0 -4
- package/layers/support/GeoreferenceBase.js +0 -2
- package/widgets/BatchAttributeForm/inputs/support/textInputElementUtils.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{removeUnordered as r}from"../../../../core/arrayUtils.js";import{createTask as o}from"../../../../core/asyncUtils.js";import{clone as s}from"../../../../core/lang.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfAborted as n,allSettledValues as a,whenOrAbort as l}from"../../../../core/promiseUtils.js";import{initial as p,watch as d,on as c}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{convertGeometryToFlat as m}from"../../../../geometry/FlatGeometry.js";import g from"../../../../geometry/Polygon.js";import{initializeProjection as f,
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{removeUnordered as r}from"../../../../core/arrayUtils.js";import{createTask as o}from"../../../../core/asyncUtils.js";import{clone as s}from"../../../../core/lang.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfAborted as n,allSettledValues as a,whenOrAbort as l}from"../../../../core/promiseUtils.js";import{initial as p,watch as d,on as c}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{convertGeometryToFlat as m}from"../../../../geometry/FlatGeometry.js";import g from"../../../../geometry/Polygon.js";import{initializeProjection as f,canProjectWithoutEngine as _,project as v}from"../../../../geometry/projectionUtils.js";import{normalizeCentralMeridianForDisplay as S}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as w}from"../../../../geometry/support/typeUtils.js";import{FlatFeature as j}from"../../../../layers/graphics/FlatFeature.js";import F from"../../../../layers/graphics/data/FlatFeatureStore.js";import{QueryEngine as E}from"../../../../layers/graphics/data/QueryEngine.js";import b from"../../../../layers/support/FieldsIndex.js";import{elevationContextAffectsAlignment as k}from"../../../../support/elevationInfoUtils.js";import{symbolHasExtrudeSymbolLayer as C}from"../../../../symbols/support/utils.js";import{sortCandidatesInPlace as A,makeSnappingQuery as I}from"../snappingUtils.js";import{makeGetGroundElevation as P,convertSnappingCandidate as G}from"./queryEngineUtils.js";import{getSnappingCandidateElevationAligner as H}from"./snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as x}from"./snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as R}from"./symbologySnappingCandidates.js";import{TaskPriority as U}from"../../../support/Scheduler.js";const Z="graphics-collections";let z=class extends t{get updating(){return this._updatingHandles.updating}get _hasZ(){return"map-notes"!==this.layerSource.layer.type}get _snappingElevationAligner(){const{view:e}=this,{layer:t}=this.layerSource,r=null!=e&&"3d"===e.type;if(!r||"map-notes"===t.type)return H();const o=async(r,o)=>(await l(e.whenLayerView(t),o)).elevationAlignPointsInFeatures(r,o);return H(r,{elevationInfo:t.elevationInfo,alignPointsInFeatures:o})}get _snappingElevationFilter(){const{view:e}=this,t=null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type;return x(t)}get _symbologySnappingFetcher(){const{view:e}=this,{layer:t}=this.layerSource,r=null!=e&&"3d"===e.type,o=this._extrudedPolygonSymbolsCount>0;return r&&"map-notes"!==t.type&&o?R(o,async(r,o)=>{const s=await e.whenLayerView(t);return n(o),s.queryForSymbologySnapping({candidates:r,spatialReference:e.spatialReference},o)}):R()}constructor(e){super(e),this.availability=1,this._sources={multipoint:null,point:null,polygon:null,polyline:null},this._loadedWkids=new Set,this._loadedWkts=new Set,this._pendingAdds=[],this._extrudedPolygonSymbolsCount=0,this._updatingHandles=new y,this._memoizedMakeGetGroundElevation=i(P)}destroy(){for(const e of this._pendingAdds)e.task.abort();this._pendingAdds.length=0,this._mapSources(e=>this._destroySource(e)),this._updatingHandles.destroy()}initialize(){this._updatingHandles.add(()=>this.getGraphicsLayers(),e=>{this._updatingHandles.removeHandles(Z);for(const t of e)this._addMany(t.graphics.toArray()),this.addHandles([t.on("graphic-update",e=>this._onGraphicUpdate(e)),this._updatingHandles.addOnCollectionChange(()=>t.graphics,e=>this._onGraphicsChanged(e))],Z)},p);const{view:e}=this,{layer:t}=this.layerSource;null!=e&&"3d"===e.type&&"map-notes"!==t.type&&e.elevationProvider&&this.addHandles([e.elevationProvider.on("elevation-change",({context:e})=>{k(e,t.elevationInfo)&&this._snappingElevationAligner.notifyElevationSourceChange()}),d(()=>t.elevationInfo,()=>this._snappingElevationAligner.notifyElevationSourceChange(),p),c(()=>t,["edits","apply-edits","graphic-update"],()=>this._symbologySnappingFetcher.notifySymbologyChange())])}async fetchCandidates(e,t){const{point:r,coordinateHelper:{spatialReference:o}}=e,s=await a(this._mapSources(r=>this._fetchCandidatesForSource(r,e,t)));n(t);const i=this._memoizedMakeGetGroundElevation(this.view,o),l=s.flat().map(t=>G(t,e.mode,i));return A(r,l),l}async _fetchCandidatesForSource(e,t,r){const o=I({parameters:t,returnZ:this._hasZ}),s=await e.queryEngine.executeQueryForSnapping(o,r);n(r);const i=await this._snappingElevationAligner.alignCandidates(s.candidates,t.coordinateHelper.spatialReference,r);n(r);const a=await this._symbologySnappingFetcher.fetch(i,r);n(r);const l=0===a.length?i:[...i,...a];return this._snappingElevationFilter.filter(o,l)}refresh(){}_onGraphicUpdate(e){if(this.getGraphicsLayers().some(t=>t.graphics.includes(e.graphic)))switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],r=new Map;for(const o of e)null!=o.geometry&&(this._needsInitializeProjection(o.geometry.spatialReference)?(t.push(o.geometry.spatialReference),r.set(o.uid,o)):this._add(o));this._createPendingAdd(t,r)}_createPendingAdd(e,t){if(!e.length)return;const s=o(async r=>{await f(e.map(e=>({source:e,dest:this.spatialReference})),{signal:r}),this._markLoadedSpatialReferences(e);for(const e of t.values())this._add(e)});this._updatingHandles.consumePromise(s.promise);const i={task:s,graphics:t},n=()=>r(this._pendingAdds,i);s.promise.then(n,n),this._pendingAdds.push(i)}_markLoadedSpatialReferences(e){for(const t of e){null!=t.wkid&&this._loadedWkids.add(t.wkid);const e=t.wkt2||t.wkt;e&&this._loadedWkts.add(e)}}_add({geometry:e,visible:t,uid:r,symbol:o}){if(null==e||!t)return;if("mesh"===e.type)return;"extent"===e.type&&(e=g.fromExtent(e));const s=this._ensureSource(e.type);if(null==s)return;const i=this._createFlatFeature(r,e);null!=i&&(s.featureStore.add(i),C(o)&&this._extrudedPolygonSymbolsCount++)}_needsInitializeProjection(e){if(null!=e.wkid&&this._loadedWkids.has(e.wkid))return!1;const t=e.wkt2||e.wkt;return(!t||!this._loadedWkts.has(t))&&!_(e,this.spatialReference)}_createFlatFeature(e,t){const r=S(t);if(!r)return null;const o=v(r,this.spatialReference);if(!o)return null;const s=this._ensureGeometryHasZ(o),i=m(s);return new j(i,{[O]:e},null,e)}_ensureGeometryHasZ(e){if(!this._hasZ)return e;const t=e=>{for(;e.length<3;)e.push(0)},r=s(e);return"x"in r?r.z=r.z??0:"points"in r?(r.points.forEach(t),r.hasZ=!0):"paths"in r?(r.paths.forEach(e=>e.forEach(t)),r.hasZ=!0):"rings"in r&&(r.rings.forEach(e=>e.forEach(t)),r.hasZ=!0),r}_ensureSource(e){const t=this._sources[e];if(null!=t)return t;const r=this._createSource(e);return this._sources[e]=r,r}_createSource(e){const t=w.toJSON(e),r=this._hasZ,o=new F(t,r,!1);return{featureStore:o,queryEngine:new E({featureStore:o,fieldsIndex:b.fromLayerJSON({fields:[{name:O,type:"esriFieldTypeOID",alias:O}]}),geometryType:t,hasM:!1,hasZ:r,featureIdInfo:{type:"object-id",fieldName:O},spatialReference:this.spatialReference,priority:U.SNAPPING,scheduler:null!=this.view&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources(t=>this._removeFromSource(t,e));for(const t of this._pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const r=t.uid;e.featureStore.has(r)&&(e.featureStore.removeById(t.uid),C(t.symbol)&&this._extrudedPolygonSymbolsCount--)}_destroySource(e){e.queryEngine.destroy(),this._sources[e.type]=null}_mapSources(e){const{point:t,polygon:r,polyline:o,multipoint:s}=this._sources,i=[];return null!=t&&i.push(e(t)),null!=r&&i.push(e(r)),null!=o&&i.push(e(o)),null!=s&&i.push(e(s)),i}};e([u()],z.prototype,"getGraphicsLayers",void 0),e([u({constructOnly:!0})],z.prototype,"layerSource",void 0),e([u({constructOnly:!0})],z.prototype,"spatialReference",void 0),e([u({constructOnly:!0})],z.prototype,"view",void 0),e([u({readOnly:!0})],z.prototype,"updating",null),e([u({readOnly:!0})],z.prototype,"availability",void 0),e([u()],z.prototype,"_hasZ",null),e([u()],z.prototype,"_snappingElevationAligner",null),e([u()],z.prototype,"_snappingElevationFilter",null),e([u()],z.prototype,"_symbologySnappingFetcher",null),e([u()],z.prototype,"_extrudedPolygonSymbolsCount",void 0),z=e([h("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],z);const O="OBJECTID";export{z as GraphicsSnappingSource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{create as t,markAsTarget as e,fromValues as
|
|
2
|
+
import{create as t,markAsTarget as e,fromValues as r}from"../../sketch/normalizedPoint.js";import{DrapedEdgeSnappingCandidate as n}from"../candidates/DrapedEdgeSnappingCandidate.js";import{EdgeSnappingCandidate as a}from"../candidates/EdgeSnappingCandidate.js";import{VertexSnappingCandidate as d}from"../candidates/VertexSnappingCandidate.js";function o(t,e){const{x:n,y:a}=t,d="3d"===e&&null!=t.z?t.z:0;return r(n,a,d)}function i(r,i,g){switch(r.type){case"edge":return r.draped?new n({edgeStart:o(r.start,i),edgeEnd:o(r.end,i),targetPoint:e(o(r.target,i)),objectId:r.objectId,getGroundElevation:g}):new a({edgeStart:o(r.start,i),edgeEnd:o(r.end,i),targetPoint:e(o(r.target,i)),objectId:r.objectId,isDraped:!1,curve:r.curve});case"vertex":return new d({targetPoint:e(o(r.target,i)),objectId:r.objectId,isDraped:!1,originalTargetPoint:t(r.target.x,r.target.y,r.target.z)})}}function g(t,e){return"3d"===t?.type?(r,n)=>t.elevationProvider.getElevation(r,n,0,e,"ground"):()=>null}export{i as convertSnappingCandidate,g as makeGetGroundElevation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{LRUCache as e}from"../../../../core/LRUCache.js";import{getOrCreateMapValue as t}from"../../../../core/MapUtils.js";import{throwIfAborted as s}from"../../../../core/promiseUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/units.js";import{
|
|
2
|
+
import{LRUCache as e}from"../../../../core/LRUCache.js";import{getOrCreateMapValue as t}from"../../../../core/MapUtils.js";import{throwIfAborted as s}from"../../../../core/promiseUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/units.js";import{getEndpoint as o}from"../../../../geometry/support/curves/curveUtils.js";import{getMetersPerUnit as i}from"../../../../symbols/support/unitConversionUtils.js";function r(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new u(e,s)}return new a}class a{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}const c=1024;class u{constructor(t,s){this._elevationInfo=t,this._alignPointsInFeatures=s,this._alignmentsCache=new e(c),this._cacheVersion=0}async alignCandidates(e,t,s){const n=this._elevationInfo;return null==n||"absolute-height"!==n.mode||n.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(p(e,t,n),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,n,o){const i=new Map;for(const s of e)t(i,s.objectId,d).push(s);const[r,a,c]=this._prepareQuery(i,n),u=await this._alignPointsInFeatures(r,o);s(o);if(c!==this._cacheVersion)return this._alignComputedElevationCandidates(e,n,o);this._applyCacheAndResponse(r,u,a);const{drapedObjectIds:h,failedObjectIds:l}=u,p=[];for(const t of e){const{objectId:e}=t;h.has(e)&&"edge"===t.type&&(t.draped=!0),l.has(e)||p.push(t)}return p}_prepareQuery(e,t){const s=[],n=[];for(const[o,i]of e){const e=[];for(const t of i)this._addToQueriesOrCachedResult(o,t.target,e,n),"edge"===t.type&&(this._addToQueriesOrCachedResult(o,t.start,e,n),this._addToQueriesOrCachedResult(o,t.end,e,n));0!==e.length&&s.push({objectId:o,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},n,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,n){const o=l(e,t),i=this._alignmentsCache.get(o);null==i?s.push(t):n.push(new h(t,i))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:n},o){for(const a of o)a.apply();let i=0;const r=this._alignmentsCache;for(const{objectId:a,points:c}of e.pointsInFeatures){if(n.has(a)){i+=c.length;continue}const e=!s.has(a);for(const s of c){const n=l(a,s),o=t[i++];s.z=o,e&&r.put(n,o,1)}}}}class h{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function l(e,{x:t,y:s,z:n,spatialReference:o}){return`${e}-${t}-${s}-${n??0}}-wkid:${o?.wkid}`}function p(e,t,s){const{offset:r,unit:a}=s;if(null==r)return;const c=n(t),u=r*(i(a??"meters")/c);for(const n of e)switch(n.type){case"edge":n.start.z+=u,n.end.z+=u,n.curve&&(o(n.curve)[2]+=u);continue;case"vertex":n.target.z+=u;continue}}function d(){return[]}export{r as getSnappingCandidateElevationAligner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{filter(t,n){return n}notifyElevationSourceChange(){}}class n{filter(t,n){const{point:r,distance:
|
|
2
|
+
class t{filter(t,n){return n}notifyElevationSourceChange(){}}class n{filter(t,n){const{point:r,distance:o}=t,{z:c}=r;if(!(null!=c))return n;if(0===n.length)return n;const i=s(o),u=this._updateCandidatesTo3D(n,r,i).filter(e);return u.sort(a),u}_updateCandidatesTo3D(t,n,e){for(const r of t)switch(r.type){case"edge":o(r,n,e);continue;case"vertex":i(r,n,e);continue}return t}}function e(t){return t.distance<=1}function r(e=!1){return e?new n:new t}function o(t,n,{x:e,y:r,z:o}){const{start:i,end:s,target:a}=t;if(t.curve)throw new Error("Curves are not yet supported.");t.draped||c(a,n,i,s);const u=(n.x-a.x)/e,d=(n.y-a.y)/r,f=(n.z-a.z)/o;t.distance=Math.sqrt(u*u+d*d+f*f)}function c(t,n,e,r){const o=r.x-e.x,c=r.y-e.y,i=r.z-e.z,s=o*o+c*c+i*i,a=(n.x-e.x)*o+(n.y-e.y)*c+i*(n.z-e.z),u=Math.min(1,Math.max(0,a/s)),d=e.x+o*u,f=e.y+c*u,y=e.z+i*u;t.x=d,t.y=f,t.z=y}function i(t,n,{x:e,y:r,z:o}){const{target:c}=t,i=(n.x-c.x)/e,s=(n.y-c.y)/r,a=(n.z-c.z)/o,u=Math.sqrt(i*i+s*s+a*a);t.distance=u}function s(t){return"number"==typeof t?{x:t,y:t,z:t}:t}function a(t,n){return t.distance-n.distance}export{r as getSnappingCandidateElevationFilter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{distance as t,exactEquals as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{curveLength as i}from"../../../../geometry/support/curves/curveLength.js";import{isCoordinate as s,curveEquals as r}from"../../../../geometry/support/curves/curveUtils.js";import{SnappingHint as h}from"./SnappingHint.js";class n extends h{constructor(e,r,h,n,l=3,a=!0,o=!0,u=null){if(super(n,l),this.type=e,this.lineStart=r,this.lineEnd=h,this.fadeLeft=a,this.fadeRight=o,!u||s(u))return this.length=t(this.lineStart,this.lineEnd),void(this.curve=this.lineEnd);this.length=i(this.lineStart,u,1),this.curve=u;const c=(this.lineStart[2]-this.lineEnd[2])**2;c>1e-8&&(this.length=Math.sqrt(this.length*this.length+c))}equals(t){return t instanceof n&&this.type===t.type&&e(this.lineStart,t.lineStart)&&e(this.lineEnd,t.lineEnd)&&r(this.curve,t.curve)&&this.fadeLeft===t.fadeLeft&&this.fadeRight===t.fadeRight}}export{n as LineSnappingHint};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as n,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as b,unpackFieldNames as v,collectLabelingFields as w,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as R,collectOrderByInfos as q,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as O,collectField as _,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{getUtilityNetworkFields as U}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import T from"./LayerView.js";import{getFetchPopupTemplate as D,getRequiredFields as N}from"./support/popupUtils.js";import{WhereClauseVisitor as Q}from"./support/WhereClauseVisitor.js";let G=class extends T{constructor(){super(...arguments),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&U(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?b(t,[...v(t,e.outFields),...i]):b(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,n(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=D(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new Q(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,o="featureReduction"in i?i.featureReduction:null,n=new Set,a=[l?l.collectRequiredFields(n,r):null,w(n,i),e&&"elevationInfo"in i?E(n,i):null,null!=this.filter?x(n,i,this.filter):null,e||null==this.featureEffect?null:x(n,i,this.featureEffect.filter),!e&&o?R(n,i,o):null,!e&&s?q(n,i,s):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&j(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(n,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&"displayFilterInfo"in i&&a.push(O(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){_(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),w(n,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&_(n,r,y);const u=await Promise.allSettled(a);if(e)_(n,r,i.objectIdField);else for(const t of p(S(i)))_(n,r,t);e&&"displayField"in i&&i.displayField&&_(n,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const o of e){if(!s){const e=await I(o);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(o))??!1}const e=await N(this.layer,o);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([u()],G.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],G.prototype,"availableFields",null),e([u({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],G.prototype,"featureEffect",null),e([u({type:c})],G.prototype,"filter",void 0),e([u()],G.prototype,"layer",void 0),e([u({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],G.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],G.prototype,"requiredFields",void 0),e([u({readOnly:!0})],G.prototype,"signedInUser",null),e([u()],G.prototype,"view",void 0),G=e([d("esri.views.layers.FeatureLikeLayerView")],G);export{G as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as b,unpackFieldNames as v,collectLabelingFields as w,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as R,collectOrderByInfos as q,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as O,collectField as _,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as U}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as T}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as N}from"./support/popupUtils.js";import{WhereClauseVisitor as G}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&T(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?b(t,[...v(t,e.outFields),...i]):b(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=Q(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new G(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,o=new Set,a=[l?l.collectRequiredFields(o,r):null,w(o,i),e&&"elevationInfo"in i?E(o,i):null,null!=this.filter?x(o,i,this.filter):null,e||null==this.featureEffect?null:x(o,i,this.featureEffect.filter),!e&&n?R(o,i,n):null,!e&&s?q(o,i,s):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?U(o,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(o,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(o,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(o,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(o,i.fieldsIndex,[i.timeInfo.endField]),await C(o,i)}if("floorInfo"in i&&i.floorInfo&&j(o,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(o,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(o,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&"displayFilterInfo"in i&&a.push(O(o,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(o,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){_(o,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(o,r),w(o,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(o,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&_(o,r,y);const u=await Promise.allSettled(a);if(e)_(o,r,i.objectIdField);else for(const t of p(S(i)))_(o,r,t);e&&"displayField"in i&&i.displayField&&_(o,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(o).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const n of e){if(!s){const e=await I(n);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await N(this.layer,n);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([u()],B.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],B.prototype,"availableFields",null),e([u({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],B.prototype,"featureEffect",null),e([u({type:c})],B.prototype,"filter",void 0),e([u()],B.prototype,"layer",void 0),e([u({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],B.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],B.prototype,"requiredFields",void 0),e([u({readOnly:!0})],B.prototype,"signedInUser",null),e([u()],B.prototype,"view",void 0),B=e([d("esri.views.layers.FeatureLikeLayerView")],B);export{B as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{parseWhereClause as i}from"../../../core/sql.js";class s{constructor(i){this._fieldsIndex=i,this._clauses=[]}async finish(){return{requiresCurrentUser:(await Promise.all(this._clauses)).some(i=>i
|
|
2
|
+
import{parseWhereClause as i}from"../../../core/sql.js";import{getRelativeTimeFields as e}from"../../../layers/support/relativeTimeQueryUtils.js";class s{constructor(i){this._fieldsIndex=i,this._clauses=[]}async finish(){return{requiresCurrentUser:(await Promise.all(this._clauses)).some(i=>i?.currentUserRequired)}}visitClientWhereClause(e){e&&this._clauses.push(i(e,this._fieldsIndex))}visitFeatureReduction(i){if(i)switch(i.type){case"binning":case"cluster":this.visitLabelingInfo(i.labelsVisible,i.labelingInfo)}}visitLabelingInfo(i,e){if(i&&null!=e)for(const s of e)this.visitClientWhereClause(s.where)}visitDisplayFilter(i,e){if(i)for(const s of e?.filters??[])this.visitClientWhereClause(s.where)}visitFilter(i){this.visitClientWhereClause(i?.where)}visitRelativeTimeQuery(s){this._clauses.push(e(this._fieldsIndex,s).then(e=>s&&e.length>0?i(s,this._fieldsIndex):null))}visitTrackInfo(i){null!=i&&(this.visitLabelingInfo(i?.latestObservations.labelsVisible,i?.latestObservations.labelingInfo),this.visitLabelingInfo(i?.previousObservations.labelsVisible,i?.previousObservations.labelingInfo),this.visitLabelingInfo(i?.trackLines.labelsVisible,i?.trackLines.labelingInfo))}}export{s as WhereClauseVisitor};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types and interfaces for feature selection in layers and views.
|
|
3
|
+
*
|
|
4
|
+
* @since 5.0
|
|
5
|
+
*/
|
|
6
|
+
import type Graphic from "../../Graphic.js";
|
|
7
|
+
import type Accessor from "../../core/Accessor.js";
|
|
8
|
+
import type GraphicsLayer from "../../layers/GraphicsLayer.js";
|
|
9
|
+
import type Field from "../../layers/support/Field.js";
|
|
10
|
+
import type FieldsIndex from "../../layers/support/FieldsIndex.js";
|
|
11
|
+
import type FeatureSet from "../../rest/support/FeatureSet.js";
|
|
12
|
+
import type Query from "../../rest/support/Query.js";
|
|
13
|
+
import type { LoadableMixin } from "../../core/Loadable.js";
|
|
14
|
+
import type { FeatureTitleOptions } from "../../layers/types.js";
|
|
15
|
+
import type { RendererUnion } from "../../renderers/types.js";
|
|
16
|
+
import type { RequestOptions } from "../../request/types.js";
|
|
17
|
+
import type { ObjectId } from "../types.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* An identifier used to represent a selected feature in a layer. This can either be a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) (for layers with graphics) or an object ID (for layers with object IDs).
|
|
21
|
+
*
|
|
22
|
+
* @since 5.0
|
|
23
|
+
*/
|
|
24
|
+
export type SelectionIdentifier = Graphic | ObjectId;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A simple object representing the selected features in a layer.
|
|
28
|
+
*
|
|
29
|
+
* @since 5.0
|
|
30
|
+
*/
|
|
31
|
+
export interface LayerSelection {
|
|
32
|
+
/** The layer associated with the selection. */
|
|
33
|
+
layer: SelectableLayer;
|
|
34
|
+
/** The selected features in the layer. The selection identifiers can either be [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/)s or object IDs depending on the capabilities of the layer. */
|
|
35
|
+
selection: SelectionIdentifier[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An object storing the changes in selection for a given layer.
|
|
40
|
+
*
|
|
41
|
+
* @since 5.0
|
|
42
|
+
*/
|
|
43
|
+
export interface LayerSelectionChange extends LayerSelection {
|
|
44
|
+
/** The features that were added to the selection for the layer. */
|
|
45
|
+
added?: SelectionIdentifier[];
|
|
46
|
+
/** The features that were removed from the selection for the layer. */
|
|
47
|
+
removed?: SelectionIdentifier[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** An object representing the selected features in a layer, including the layer and the feature set containing the selected features. */
|
|
51
|
+
export interface LayerFeatureSet {
|
|
52
|
+
/** The layer for which the feature set is stored. */
|
|
53
|
+
layer: SelectableLayerWithObjectIds;
|
|
54
|
+
/** The feature set containing the selected features. */
|
|
55
|
+
data: FeatureSet;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The types of layers that can be selected. */
|
|
59
|
+
export type SelectableLayerType = "csv" | "feature" | "geojson" | "parquet" | "graphics" | "knowledge-graph" | "knowledge-graph-sublayer" | "map-image" | "ogc-feature" | "stream" | "wfs" | "sublayer" | "subtype-sublayer" | "subtype-group";
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The underlying base type for selectable layers which contains common properties and methods for both layers with graphics and layers with object IDs.
|
|
63
|
+
*
|
|
64
|
+
* @since 5.0
|
|
65
|
+
*/
|
|
66
|
+
export interface SelectableLayerBase extends Accessor, LoadableMixin {
|
|
67
|
+
/** The unique identifier of the layer. */
|
|
68
|
+
id: string;
|
|
69
|
+
/** The type of the layer. */
|
|
70
|
+
type: SelectableLayerType;
|
|
71
|
+
/** **Optional:** The name of the field used to display features in the layer. */
|
|
72
|
+
displayField?: string | null;
|
|
73
|
+
/** **Optional:** The fields used to create feature titles. It can be a single field name or an array of field names. */
|
|
74
|
+
featureTitleFields?: string[];
|
|
75
|
+
/** **Optional:** The name of the global ID field in the layer. */
|
|
76
|
+
globalIdField?: string | null;
|
|
77
|
+
/** **Optional:** Indicates whether the layer is a table. */
|
|
78
|
+
isTable?: boolean | null;
|
|
79
|
+
/** **Optional:** The numeric ID of the layer in a service. */
|
|
80
|
+
layerId?: number | null;
|
|
81
|
+
/** **Optional:** The renderer assigned to the layer. */
|
|
82
|
+
renderer?: RendererUnion | null;
|
|
83
|
+
/** **Optional:** The name of the subtype field in the layer. */
|
|
84
|
+
subtypeField?: string | null;
|
|
85
|
+
/** **Optional:** The title of the layer. */
|
|
86
|
+
title?: string | null;
|
|
87
|
+
/** **Optional:** Indicates whether the layer is visible. */
|
|
88
|
+
visible?: boolean | null;
|
|
89
|
+
/**
|
|
90
|
+
* **Optional:** Gets the title for a specific feature represented by a graphic.
|
|
91
|
+
*
|
|
92
|
+
* @param graphic - The graphic for which to get the title.
|
|
93
|
+
* @param options - The options for getting the feature title.
|
|
94
|
+
* @returns A promise that resolves to the feature title.
|
|
95
|
+
*/
|
|
96
|
+
getFeatureTitle?(graphic: Graphic, options?: FeatureTitleOptions): Promise<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Gets the titles for multiple features represented by an array of graphics.
|
|
99
|
+
*
|
|
100
|
+
* @param graphics - An array of graphics for which to get the titles.
|
|
101
|
+
* @param options - The options for getting the feature titles.
|
|
102
|
+
* @returns A promise that resolves to a map of object IDs to feature titles.
|
|
103
|
+
*/
|
|
104
|
+
getFeatureTitles?(graphics: Graphic[], options?: FeatureTitleOptions): Promise<Map<ObjectId, string>>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* This applies only to layer types that support object IDs.
|
|
109
|
+
*
|
|
110
|
+
* @since 5.0
|
|
111
|
+
*/
|
|
112
|
+
export interface SelectableLayerWithObjectIds extends SelectableLayerBase {
|
|
113
|
+
/** An array of fields in the layer. */
|
|
114
|
+
fields: Field[];
|
|
115
|
+
/** A fields index for a specific field in the layer. This helps to quickly look up field information by field name. */
|
|
116
|
+
fieldsIndex: FieldsIndex<Field>;
|
|
117
|
+
/** The name of the Object ID field in the layer. */
|
|
118
|
+
objectIdField: string;
|
|
119
|
+
/**
|
|
120
|
+
* Creates a new query object for the layer.
|
|
121
|
+
*
|
|
122
|
+
* @returns A new query object for the layer.
|
|
123
|
+
*/
|
|
124
|
+
createQuery(): Query;
|
|
125
|
+
/**
|
|
126
|
+
* Queries features from the layer based on the provided query parameters.
|
|
127
|
+
*
|
|
128
|
+
* @param query - The query parameters.
|
|
129
|
+
* @param requestOptions - Additional options for the request.
|
|
130
|
+
* @returns A promise that resolves to the feature set containing the queried features.
|
|
131
|
+
*/
|
|
132
|
+
queryFeatures(query?: Query, requestOptions?: RequestOptions): Promise<FeatureSet>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* A selectable layer which can either be layers containing object IDs or layers with graphics.
|
|
137
|
+
*
|
|
138
|
+
* @since 5.0
|
|
139
|
+
*/
|
|
140
|
+
export type SelectableLayer = SelectableLayerWithObjectIds | GraphicsLayer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isGraphic as n}from"../../support/graphicInstanceUtils.js";function e(n){return!(null==n||"object"!=typeof n||!("id"in n)||!("type"in n))}function r(n){return!!(e(n)&&"on"in n&&n.on)}function t(n){return!!(e(n)&&"graphics"in n&&n.graphics)}function i(n){return!!(e(n)&&"fields"in n&&"fieldsIndex"in n&&"objectIdField"in n&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function u(n){return i(n)||t(n)}function c(n){return!!(null!=n&&"object"==typeof n&&"layer"in n&&n.layer&&e(n.layer)&&"view"in n)}function o(n){return!(!c(n)||!("queryGraphics"in n))}function a(n){return!!(c(n)&&"highlight"in n&&n.highlight)}function f(n){return!!(c(n)&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function l(n){return f(n)||o(n)}function y(n){return
|
|
2
|
+
import{isGraphic as n}from"../../support/graphicInstanceUtils.js";function e(n){return!(null==n||"object"!=typeof n||!("id"in n)||!("type"in n))}function r(n){return!!(e(n)&&"on"in n&&n.on)}function t(n){return!!(e(n)&&"graphics"in n&&n.graphics)}function i(n){return!!(e(n)&&"fields"in n&&"fieldsIndex"in n&&"objectIdField"in n&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function u(n){return i(n)||t(n)}function c(n){return!!(null!=n&&"object"==typeof n&&"layer"in n&&n.layer&&e(n.layer)&&"view"in n)}function o(n){return!(!c(n)||!("queryGraphics"in n))}function a(n){return!!(c(n)&&"highlight"in n&&n.highlight)}function f(n){return!!(c(n)&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function l(n){return f(n)||o(n)}function y(n){return!(null==n||"object"!=typeof n||!("isTable"in n)||!n.isTable)}function s(e){return!!e.length&&n(e[0])}export{s as isGraphicsSelectionIdentifier,u as isISelectableLayer,e as isISelectableLayerBase,r as isISelectableLayerBaseWithEditing,l as isISelectableLayerView,c as isISelectableLayerViewBase,o as isISelectableLayerViewWithGraphics,a as isISelectableLayerViewWithHighlights,f as isISelectableLayerViewWithObjectIds,t as isISelectableLayerWithGraphics,i as isISelectableLayerWithObjectIds,y as isTableLayer};
|
package/views/ui/DefaultUI.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface DefaultUIProperties extends UIProperties, Partial<Pick<DefaultU
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The DefaultUI class exposes the default
|
|
9
|
-
* [
|
|
9
|
+
* [widgets](https://developers.arcgis.com/javascript/latest/references/core/widgets/Widget/) and [components](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#components) available in either a
|
|
10
10
|
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). This class
|
|
11
11
|
* also provides a simple API for [adding](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#add), [moving](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#move) and [removing](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#remove)
|
|
12
12
|
* [widgets](https://developers.arcgis.com/javascript/latest/references/core/widgets/Widget/) and other HTML components from the view's UI.
|
|
@@ -63,22 +63,15 @@ export default class DefaultUI extends UI {
|
|
|
63
63
|
* [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) is created. The default widgets differ between MapView
|
|
64
64
|
* and SceneView.
|
|
65
65
|
*
|
|
66
|
-
* The following are the default
|
|
66
|
+
* The following are the default widgets in each view:
|
|
67
67
|
*
|
|
68
|
-
* **MapView:** `["
|
|
68
|
+
* **MapView:** `["zoom"]`
|
|
69
69
|
*
|
|
70
|
-
* **SceneView:** `["
|
|
70
|
+
* **SceneView:** `["navigation-toggle", "compass", "zoom"]`
|
|
71
71
|
*
|
|
72
72
|
* > [!WARNING]
|
|
73
73
|
* >
|
|
74
|
-
* >
|
|
75
|
-
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
76
|
-
* > For information on terms of use, see the [Terms of Use FAQ](https://developers.arcgis.com/terms/faq/).
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* // Removes all default UI components, except Attribution.
|
|
80
|
-
* // Passing an empty array will remove all components.
|
|
81
|
-
* view.ui.components = [ "attribution" ];
|
|
74
|
+
* > As of version 5.0, attribution is a part of the view itself. To control the visibility of the attribution, use the [View.attributionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#attributionVisible) property.
|
|
82
75
|
*/
|
|
83
76
|
accessor components: ComponentName[];
|
|
84
77
|
}
|
package/views/ui/DefaultUI.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import"../../core/has.js";import"../../core/Logger.js";import{watch as i,initial as e}from"../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../core/accessorSupport/decorators.js";import
|
|
2
|
+
import{__decorate as t}from"tslib";import"../../core/has.js";import"../../core/Logger.js";import{watch as i,initial as e}from"../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../core/accessorSupport/decorators.js";import n from"./Component.js";import r from"./UI.js";import a from"../../widgets/Compass.js";import d from"../../widgets/NavigationToggle.js";import p from"../../widgets/Zoom.js";function c(t){return void 0!==t?.view}let m=class extends r{constructor(t){super(t),this._defaultPositionLookup={compass:"top-left","navigation-toggle":"top-left",zoom:"top-left"},this.components=[],this._updateViewAwareWidgets=t=>{this.components.forEach(i=>{const e=this._find(i),o=e?.widget;c(o)&&(o.view=t)})},this._componentsWatcher=(t,i)=>{this._removeComponents(i),this._addComponents(t)},this._adjustPadding=({ready:t,attributionVisible:i})=>{if(t&&!i&&!this._isOverridden("padding")){const{top:t}=this.padding;this.padding=t}}}initialize(){this.addHandles([i(()=>this.components,this._componentsWatcher,e),i(()=>this.view,this._updateViewAwareWidgets,e),i(()=>({ready:this.view?.ready,attributionVisible:this.view?.attributionVisible}),this._adjustPadding,e)])}_add(t,i,e,o,s){let n=t;if("string"==typeof t&&this._defaultPositionLookup[t]){if(this._find(t))return;n=this._createComponent(t)}super._add(n,i,e,o,s)}_removeComponents(t){t.forEach(t=>{const i=this._find(t);i&&(this.remove(i),i.destroy())})}_addComponents(t){this.constructed&&t.forEach(t=>this.add(this._createComponent(t),this._defaultPositionLookup[t]))}_createComponent(t){const i=this._createWidget(t);return new n({id:t,node:i})}_createWidget(t){const i=this.view;switch(t){case"compass":return new a({view:i});case"navigation-toggle":return new d({view:i,isDefaultUI:!0});case"zoom":return new p({view:i})}}};t([o()],m.prototype,"components",void 0),m=t([s("esri.views.ui.DefaultUI")],m);const h=m;export{h as default};
|
package/views/ui/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Widget from "../../widgets/Widget.js";
|
|
2
2
|
|
|
3
3
|
/** @since 5.0 */
|
|
4
|
-
export type ComponentName = "
|
|
4
|
+
export type ComponentName = "compass" | "navigation-toggle" | "zoom";
|
|
5
5
|
|
|
6
6
|
/** @since 5.0 */
|
|
7
7
|
export interface Options {
|
package/webscene/Glow.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export interface GlowProperties extends Partial<Pick<Glow, "intensity">> {}
|
|
|
6
6
|
/**
|
|
7
7
|
* Glow accentuates the effects of light emitters for illustrative visualizations, such as highlighting or filtering.
|
|
8
8
|
*
|
|
9
|
+
* > [!WARNING]
|
|
10
|
+
* >
|
|
11
|
+
* > **Known Limitations**
|
|
12
|
+
* > [Symbol3DEmissive](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/) and [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) require support for the WebGL2 extension `EXT_float_blend`.
|
|
13
|
+
*
|
|
9
14
|
* Example:
|
|
10
15
|
* ```js
|
|
11
16
|
* let view = new SceneView({
|
|
@@ -9,7 +9,16 @@ export interface SunLightingProperties extends Partial<Pick<SunLighting, "direct
|
|
|
9
9
|
* This might lead to different lighting for users in different time zones.
|
|
10
10
|
*/
|
|
11
11
|
date?: (Date | number | string);
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
14
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
15
|
+
* disable the effect.
|
|
16
|
+
*
|
|
17
|
+
* Example:
|
|
18
|
+
* ```js
|
|
19
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
13
22
|
glow?: GlowProperties | null;
|
|
14
23
|
}
|
|
15
24
|
|
|
@@ -46,7 +55,16 @@ export default class SunLighting extends JSONSupport {
|
|
|
46
55
|
* This value does not have an impact on the actual lighting of the scene.
|
|
47
56
|
*/
|
|
48
57
|
accessor displayUTCOffset: number | null | undefined;
|
|
49
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
60
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
61
|
+
* disable the effect.
|
|
62
|
+
*
|
|
63
|
+
* Example:
|
|
64
|
+
* ```js
|
|
65
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
50
68
|
get glow(): Glow | null | undefined;
|
|
51
69
|
set glow(value: GlowProperties | null | undefined);
|
|
52
70
|
/** Indicates that the light source is simulated position of the sun. */
|
|
@@ -3,7 +3,16 @@ import type { JSONSupport } from "../core/JSONSupport.js";
|
|
|
3
3
|
import type { GlowProperties } from "./Glow.js";
|
|
4
4
|
|
|
5
5
|
export interface VirtualLightingProperties extends Partial<Pick<VirtualLighting, "directShadowsEnabled">> {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
8
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
9
|
+
* disable the effect.
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* ```js
|
|
13
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
7
16
|
glow?: GlowProperties | null;
|
|
8
17
|
}
|
|
9
18
|
|
|
@@ -29,7 +38,16 @@ export default class VirtualLighting extends JSONSupport {
|
|
|
29
38
|
* @default false
|
|
30
39
|
*/
|
|
31
40
|
accessor directShadowsEnabled: boolean;
|
|
32
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
43
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
44
|
+
* disable the effect.
|
|
45
|
+
*
|
|
46
|
+
* Example:
|
|
47
|
+
* ```js
|
|
48
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
33
51
|
get glow(): Glow | null | undefined;
|
|
34
52
|
set glow(value: GlowProperties | null | undefined);
|
|
35
53
|
/**
|
|
@@ -18,7 +18,7 @@ export type AttributionViewModelState = "disabled" | "ready" | "loading";
|
|
|
18
18
|
* >
|
|
19
19
|
* > Esri requires that when you use an ArcGIS Online basemap in your app, the map must include Esri attribution and you must be licensed to use the content.
|
|
20
20
|
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
21
|
-
* > For information
|
|
21
|
+
* > For information, see the [Terms of Use documentation](https://developers.arcgis.com/documentation/terms-of-use/).
|
|
22
22
|
*
|
|
23
23
|
* @since 4.0
|
|
24
24
|
* @see [Attribution](https://developers.arcgis.com/javascript/latest/references/core/widgets/Attribution/)
|
package/widgets/Attribution.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface AttributionProperties extends WidgetProperties, Partial<Pick<At
|
|
|
57
57
|
* >
|
|
58
58
|
* > Esri requires that when you use an ArcGIS Online basemap in your app, the map must include Esri attribution and you must be licensed to use the content.
|
|
59
59
|
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
60
|
-
* > For information
|
|
60
|
+
* > For information, see the [Terms of Use documentation](https://developers.arcgis.com/documentation/terms-of-use/).
|
|
61
61
|
*
|
|
62
62
|
* @deprecated since version 5.0. As of 5.0, attribution is handled automatically by the [Map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) and [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/) components, with properties for extracting attribution items, hiding the attribution, as well as setting dark and light mode for the attribution. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
63
63
|
* @since 4.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{whenOrAbort as o}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{DateOnly as u}from"../../../core/sql/DateOnly.js";import{TimeOnly as c}from"../../../core/sql/TimeOnly.js";import{makeUseId as p}from"../inputs/support/inputUtils.js";import{isGroupElementTemplate as d,isFieldElementTemplate as f}from"../templates/support/templateUtils.js";let h=null,m=class extends t{constructor(e){super(e),this.calculating=!1,this.arcadeContext=null,this._abortController=new AbortController,this.layerExpressionsModelMap=new Map,this.evaluatedExpressions=new i,this.expressionEvaluationFailed=!1}abort(){this._abortController.abort()}async runAllExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,v,t)}async runGeometryDependentExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,x,t)}async valueChanged(e,t,r=!0){try{this.calculating=!0;const a=t.map(t=>this.evaluateValueChangedForFeature(e,t,r));await Promise.all(a)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}async evaluateValueChangedForFeature(e,t,r){if(this._abortController.signal.aborted)return;const a=this.layerExpressionsModelMap.get(t.layer);if(!a||0===a.components.length)return;const s=new Set,o=new Set([e]),i=new Set;for(;o.size>0;){const[e]=o;if(o.delete(e),s.has(e))continue;s.add(e);const n=a.fieldReferencesMap.get(e.toLowerCase());if(!n)continue;for(const t of n)i.has(t)&&n.delete(t);if(0===n.size)continue;const l=new Set;await this.evaluateAffectedComponents([...n],t,a,r,l);for(const t of n)i.add(t);for(const t of l)s.has(t)||o.add(t)}}async evaluateAffectedComponents(e,t,r,a,s){const o=new Map;for(const n of e)o.has(n)||o.set(n,this.createSccEvaluator(n,t,o,r));if(0===o.size)return;const i=[...o.values()].map(e=>e.evaluate(a,s));await Promise.all(i)}createSccEvaluator(e,t,r,a){const o=new g(e,t,this.arcadeContext,a,this.evaluatedExpressions,this._abortController);for(const i of e.adjacencyList)o.dependentEvaluators.push(s(r,i,()=>this.createSccEvaluator(i,t,r,a)));return o}async _evaluateSpecifiedComponentsForEachFeature(e,t,r=!1){this.calculating=!0;try{const a=[];for(const s of e){const e=this.layerExpressionsModelMap.get(s.layer);if(!e||0===e.components.length)continue;const o=new Set;a.push(this.evaluateAffectedComponents(t(e),s,e,r,o))}await o(Promise.all(a),this._abortController)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}};e([n()],m.prototype,"calculating",void 0),e([n({constructOnly:!0})],m.prototype,"arcadeContext",void 0),e([n()],m.prototype,"_abortController",void 0),e([n()],m.prototype,"layerExpressionsModelMap",void 0),e([n()],m.prototype,"evaluatedExpressions",void 0),e([n()],m.prototype,"expressionEvaluationFailed",void 0),m=e([l("esri.widgets.BatchAttributeForm.expressions.ExpressionsManager")],m);class g{constructor(e,t,r,a,s,o){this.scc=e,this.feature=t,this.arcadeContextInfo=r,this.expressionsModel=a,this.evaluatedExpressions=s,this._abortController=o,this.dependentEvaluators=[],this._evaluatorPromise=null}get baseContext(){const{editType:e,map:t,spatialReference:r,timeZone:a}=this.arcadeContextInfo,s=this.feature.layer,o="scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:s;return{variables:{$originalfeature:this.feature.original,$editcontext:{editType:e},$layer:o,$featureset:o,$datastore:o?.url,$feature:this.feature.plainGraphic,$map:t},executeContext:{rawOutput:!0,spatialReference:r??void 0,timeZone:a,abortSignal:this._abortController.signal}}}evaluate(e,t){return null==this._evaluatorPromise&&(this._evaluatorPromise=this._evaluate(e,t)),this._evaluatorPromise}async _evaluate(e,t){null===h&&(h=await import("../../../arcade/languageUtils.js"));const a=this.dependentEvaluators.map(r=>r.evaluate(e,t));await o(Promise.all(a),this._abortController);for(const o of this.scc.executors){const a=this.baseContext;if(this._abortController.signal.aborted)break;const l=this.expressionsModel.arcadeExecutorUses.get(o)??[],u=s(this.evaluatedExpressions,this.feature,()=>new i);let c=null,h=null;try{c=o.isAsync?await o.executeAsync(a.variables,a.executeContext):o.execute(a.variables,a.executeContext),h={result:c,status:"success"}}catch(n){h={error:n,status:"error"}}for(const r of l){const a=this.expressionsModel.elementTemplateMap.get(r.elementId);switch(r.executorPurpose){case"editable":case"required":u.set(p(r
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{whenOrAbort as o}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{DateOnly as u}from"../../../core/sql/DateOnly.js";import{TimeOnly as c}from"../../../core/sql/TimeOnly.js";import{makeUseId as p}from"../inputs/support/inputUtils.js";import{isGroupElementTemplate as d,isFieldElementTemplate as f}from"../templates/support/templateUtils.js";let h=null,m=class extends t{constructor(e){super(e),this.calculating=!1,this.arcadeContext=null,this._abortController=new AbortController,this.layerExpressionsModelMap=new Map,this.evaluatedExpressions=new i,this.expressionEvaluationFailed=!1}abort(){this._abortController.abort()}async runAllExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,v,t)}async runGeometryDependentExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,x,t)}async valueChanged(e,t,r=!0){try{this.calculating=!0;const a=t.map(t=>this.evaluateValueChangedForFeature(e,t,r));await Promise.all(a)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}async evaluateValueChangedForFeature(e,t,r){if(this._abortController.signal.aborted)return;const a=this.layerExpressionsModelMap.get(t.layer);if(!a||0===a.components.length)return;const s=new Set,o=new Set([e]),i=new Set;for(;o.size>0;){const[e]=o;if(o.delete(e),s.has(e))continue;s.add(e);const n=a.fieldReferencesMap.get(e.toLowerCase());if(!n)continue;for(const t of n)i.has(t)&&n.delete(t);if(0===n.size)continue;const l=new Set;await this.evaluateAffectedComponents([...n],t,a,r,l);for(const t of n)i.add(t);for(const t of l)s.has(t)||o.add(t)}}async evaluateAffectedComponents(e,t,r,a,s){const o=new Map;for(const n of e)o.has(n)||o.set(n,this.createSccEvaluator(n,t,o,r));if(0===o.size)return;const i=[...o.values()].map(e=>e.evaluate(a,s));await Promise.all(i)}createSccEvaluator(e,t,r,a){const o=new g(e,t,this.arcadeContext,a,this.evaluatedExpressions,this._abortController);for(const i of e.adjacencyList)o.dependentEvaluators.push(s(r,i,()=>this.createSccEvaluator(i,t,r,a)));return o}async _evaluateSpecifiedComponentsForEachFeature(e,t,r=!1){this.calculating=!0;try{const a=[];for(const s of e){const e=this.layerExpressionsModelMap.get(s.layer);if(!e||0===e.components.length)continue;const o=new Set;a.push(this.evaluateAffectedComponents(t(e),s,e,r,o))}await o(Promise.all(a),this._abortController)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}};e([n()],m.prototype,"calculating",void 0),e([n({constructOnly:!0})],m.prototype,"arcadeContext",void 0),e([n()],m.prototype,"_abortController",void 0),e([n()],m.prototype,"layerExpressionsModelMap",void 0),e([n()],m.prototype,"evaluatedExpressions",void 0),e([n()],m.prototype,"expressionEvaluationFailed",void 0),m=e([l("esri.widgets.BatchAttributeForm.expressions.ExpressionsManager")],m);class g{constructor(e,t,r,a,s,o){this.scc=e,this.feature=t,this.arcadeContextInfo=r,this.expressionsModel=a,this.evaluatedExpressions=s,this._abortController=o,this.dependentEvaluators=[],this._evaluatorPromise=null}get baseContext(){const{editType:e,map:t,spatialReference:r,timeZone:a}=this.arcadeContextInfo,s=this.feature.layer,o="scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:s;return{variables:{$originalfeature:this.feature.original,$editcontext:{editType:e},$layer:o,$featureset:o,$datastore:o?.url,$feature:this.feature.plainGraphic,$map:t},executeContext:{rawOutput:!0,spatialReference:r??void 0,timeZone:a,abortSignal:this._abortController.signal}}}evaluate(e,t){return null==this._evaluatorPromise&&(this._evaluatorPromise=this._evaluate(e,t)),this._evaluatorPromise}async _evaluate(e,t){null===h&&(h=await import("../../../arcade/languageUtils.js"));const a=this.dependentEvaluators.map(r=>r.evaluate(e,t));await o(Promise.all(a),this._abortController);for(const o of this.scc.executors){const a=this.baseContext;if(this._abortController.signal.aborted)break;const l=this.expressionsModel.arcadeExecutorUses.get(o)??[],u=s(this.evaluatedExpressions,this.feature,()=>new i);let c=null,h=null;try{c=o.isAsync?await o.executeAsync(a.variables,a.executeContext):o.execute(a.variables,a.executeContext),h={result:c,status:"success"}}catch(n){h={error:n,status:"error"}}for(const r of l){const a=this.expressionsModel.elementTemplateMap.get(r.elementId);switch(r.executorPurpose){case"editable":case"required":case"text":u.set(p(r),h);break;case"value":{if("error"===h?.status)continue;const e=a.getExpressionExecutorsForLayer(this.feature.layer);let r=!0;if(e?.editableExpression&&(r=!1===u.get(p({elementId:a.elementId,executorPurpose:"editable"}))?.result),r){const e=this.feature.getAttribute(a.fieldName)??null,r=y(h.result,this.feature,a.fieldName,this.arcadeContextInfo.timeZone);r!==e&&(this.feature.setAttribute(a.fieldName,r),t.add(a.fieldName))}}break;case"visibility":if(u.set(p(r),h),!this.expressionsModel.preserveFieldValuesWhenHidden&&!1===h.result&&e)if(d(a)){for(const e of a.elements)if(f(e)){null!==this.feature.getAttribute(e.fieldName)&&t.add(e.fieldName),this.feature.setAttribute(e.fieldName,null)}}else if(f(a)){null!==this.feature.getAttribute(a.fieldName)&&t.add(a.fieldName),this.feature.setAttribute(a.fieldName,null)}}}if("error"===h?.status){const e=new Set;for(const t of l){const r=this.expressionsModel.elementTemplateMap.get(t.elementId);if(r)switch(t.executorPurpose){case"editable":e.add(r.label+" - Editable expression");break;case"required":e.add(r.label+" - Required expression");break;case"value":e.add(r.label+" - Value expression");break;case"visibility":e.add(r.label+" - Visibility expression")}}if(e.size>0)throw new r("expression-evaluation-failed","Arcade evaluation failed ("+[...e].join(",")+")");throw new r("expression-evaluation-failed","Arcade evaluation failed ")}}}}function y(e,t,a,s){if(null===e)return null;const o=t.layer.fieldsIndex.get(a);if(!o)throw new r("field-not-found","Unable set field value as the field cannot be found. ("+a+")");switch(o.type){case"big-integer":case"integer":case"long":case"oid":case"small-integer":case"single":case"double":return h.toNumber(e);case"global-id":case"guid":case"string":return h.toString(e);case"date":{if(h.isDate(e))return e.getTime();const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.getTime()}case"date-only":{if(h.isDateOnly(e))return e.toStorageFormat();if(h.isDate(e))return u.fromDateTime(e.toDateTime()).toStorageFormat();const t=u.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageFormat()}case"time-only":{if(h.isTime(e))return e.toStorageString();if(h.isDate(e)){return c.fromDateTime(e.toDateTime()).toStorageString()}const t=c.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageString()}case"timestamp-offset":{if(h.isDate(e))return e.toISOString(!1);const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.toISOString(!1)}}throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")")}function v(e){return e.components}function x(e){return Array.from(e.geometryReferences)}export{m as ExpressionsManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isSome as e,pushIfSome as
|
|
2
|
+
import{isSome as e,addMany as t,pushIfSome as n}from"../../../core/arrayUtils.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import s from"../../../core/Queue.js";import{addMany as r,last as i}from"../../../core/SetUtils.js";import{isFieldElementTemplate as c}from"../templates/support/templateUtils.js";let a=0;class p{constructor(e){this.arcadeExecutorUses=new Map,this.components=[],this.preserveFieldValuesWhenHidden=!1,this.executorMap=e.executorMap,this.preserveFieldValuesWhenHidden=!0===e.preserveFieldValuesWhenHidden,this.elementTemplateMap=new Map;for(const t of this.executorMap.keys())this.elementTemplateMap.set(t.elementId,t);this._buildDependencyGraph()}_buildDependencyGraph(){const e=f(this.executorMap),t={components:[],arcadeExecutorUses:this.arcadeExecutorUses,elementTemplatesById:new Map([...this.executorMap.keys()].map(e=>[e.elementId,e])),executorMap:this.executorMap,fieldElementTemplateMap:x(this.executorMap),fieldReferencesMap:new Map,geometryReferences:new Set,nextIndex:0,nodeInfoMap:e,nodeStack:new s(i),shouldConsiderVisibility:!this.preserveFieldValuesWhenHidden};for(const n of this.executorMap.keys()){const e=this.executorMap.get(n);e.editableExpression&&o(this.arcadeExecutorUses,e.editableExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"editable"}),e.valueExpression&&o(this.arcadeExecutorUses,e.valueExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"value"}),e.visibilityExpression&&o(this.arcadeExecutorUses,e.visibilityExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"visibility"}),e.requiredExpression&&o(this.arcadeExecutorUses,e.requiredExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"required"}),e.textExpressions&&e.textExpressions.forEach((e,t)=>{o(this.arcadeExecutorUses,e,()=>[]).push({elementId:n.elementId,executorPurpose:"text",textExpressionIndex:t})})}for(const n of this.arcadeExecutorUses.values())n.sort(e=>"editable"===e.executorPurpose?-1:1);for(const n of e.values())-1===n.index&&d(n,t);this.dependencyGraphComponents=m(t.nodeInfoMap),this.fieldReferencesMap=h(t),this.geometryReferences=M(t),this.components=t.components}}function d(e,t){e.index=e.lowlink=t.nextIndex++,t.nodeStack.push(e);for(const n of l(e,t))-1===n.index?(d(n,t),e.lowlink=Math.min(e.lowlink,n.lowlink)):n.index<e.index&&t.nodeStack.contains(n)&&(e.lowlink=Math.min(e.lowlink,n.index)),t.nodeStack.contains(n)||e.crossLinkNeighbors.add(n);if(e.lowlink===e.index){const n=y();for(t.components.push(n);w(t.nodeStack)>=e.index;){const e=t.nodeStack.pop();if(null!=e){e.component=n,n.executors.add(e.executor);for(const t of e.crossLinkNeighbors)null!=t.component&&n.adjacencyList.add(t.component)}}}}function l({executor:t},n){const s=new Set;for(const e of t.fieldsUsed){const i=e.toLowerCase();o(n.fieldReferencesMap,i,()=>new Set).add(t),r(s,u(i,n))}t.geometryUsed&&n.geometryReferences.add(t);const i=n.arcadeExecutorUses.get(t)?.filter(e=>"value"===e.executorPurpose)??[];for(const e of i){const o=n.executorMap.get(n.elementTemplatesById.get(e.elementId));o?.editableExpression&&o.editableExpression!==t&&s.add(o.editableExpression)}return Array.from(s).map(e=>n.nodeInfoMap.get(e)).filter(e)}function u(e,{executorMap:t,fieldElementTemplateMap:o,shouldConsiderVisibility:s}){const r=[],i=o.get(e);if(null==i)return r;const c=t.get(i);if(null==c)return r;if(n(r,c.editableExpression),n(r,c.valueExpression),s){n(r,c.visibilityExpression);const{group:e}=i;if(null!=e){const o=t.get(e)?.visibilityExpression;n(r,o)}}return r}function x(e){const t=new Map;for(const n of e.keys())c(n)&&t.set(n.fieldName.toLowerCase(),n);return t}function f(n){const o=Array.from(n.values()).filter(e),s=new Set(o.flatMap(e=>{const{textExpressions:n,...o}=e,s=[];return n?.length&&t(s,n),t(s,Object.values(o)),s})),r=Array.from(s).map(e=>({component:null,crossLinkNeighbors:new Set,executor:e,index:-1,lowlink:-1,onStack:!1}));return new Map(r.map(e=>[e.executor,e]))}function m(e){return new Map([...e.values()].map(({component:e,executor:t})=>[t,e]))}function h({fieldReferencesMap:e,nodeInfoMap:t}){const n=new Map;for(const[o,s]of e.entries())n.set(o,E(s,t));return n}function M({geometryReferences:e,nodeInfoMap:t}){return E(e,t)}function E(e,t){const n=new Set;for(const o of e){const e=t.get(o);e?.component&&n.add(e.component)}return n}function y(){a++;const e=a.toString();return{executors:new Set,adjacencyList:new Set,componentId:e}}function w(e){return e.peek()?.index??-1}export{p as ExpressionsModel,l as getDirectDependencies};
|
|
@@ -10,7 +10,7 @@ import type { FieldInputDataTypes } from "../../support/forms/types.js";
|
|
|
10
10
|
export interface FieldInputProperties extends EditableInputProperties {}
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* This is a read-only support class that represents a field
|
|
13
|
+
* This is a read-only support class that represents a [field element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
|
|
14
14
|
*
|
|
15
15
|
* @since 4.33
|
|
16
16
|
* @see [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isAttributeFormSupportedLayerUnion as o}from"../batchAttributeFormUtils.js";import{visibilityCodeToBoolean as l,makeUseId as a}from"./support/inputUtils.js";let n=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this.template.description}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const i=this._lookupEvaluatedExpression(t,"visibility");if("success"===i?.status){if(e.add(!0===i.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isAttributeFormSupportedLayerUnion as o}from"../batchAttributeFormUtils.js";import{visibilityCodeToBoolean as l,makeUseId as a}from"./support/inputUtils.js";let n=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this.template.description}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const i=this._lookupEvaluatedExpression(t,"visibility");if("success"===i?.status){if(e.add(!0===i.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(o)))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return l(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?"hidden:visibility-expression:all-features":"visible":"hidden:visibility-expression:some-features":"hidden:not-in-all-layers"}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const i of this.features){if(null==this.template.getExpressionExecutorsForLayer(i.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const s=this._lookupEvaluatedExpression(i,"visibility");"success"===s?.status?e=e&&!0===s.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t,i){return this.expressionsManager.evaluatedExpressions.get(e)?.get(a({elementId:this.template.elementId,executorPurpose:t,textExpressionIndex:i}))}};e([s({constructOnly:!0})],n.prototype,"expressionsManager",void 0),e([s()],n.prototype,"description",null),e([s()],n.prototype,"existsInAllLayers",void 0),e([s()],n.prototype,"features",void 0),e([s()],n.prototype,"featuresHaveSameCalculatedVisibility",null),e([s()],n.prototype,"label",null),e([s()],n.prototype,"layers",null),e([s({constructOnly:!0})],n.prototype,"template",void 0),e([s()],n.prototype,"visibilityCode",null),e([s()],n.prototype,"visible",null),e([s()],n.prototype,"_baseVisibilityCode",null),e([s()],n.prototype,"_evaluatedVisibilityExpression",null),n=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],n);const p=n;export{p as default};
|