@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 t}from"tslib";import{destroyMaybe as e}from"../../../../core/maybe.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{on as
|
|
2
|
+
import{__decorate as t}from"tslib";import{destroyMaybe as e}from"../../../../core/maybe.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{on as i}from"../../../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{distance as n,exactEquals as a,copy as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import c from"../../../../geometry/Point.js";import{distanceToScale as h}from"../cameraUtils.js";import{PointOfInterest as p}from"./PointOfInterest.js";import{PropertiesPool as u}from"../../../support/PropertiesPool.js";import{Yield as m}from"../../../support/Yield.js";let _=class extends p{constructor(t){super(t),this._dirty=!1,this._propertiesPool=new u({location:()=>new c,renderLocation:()=>d()},this),this._estimatedSurfaceAltitude=0,this._elevationQueryController=null,this.renderLocation=d(),this._tmpPoint=new c}initialize(){if(this.scheduler&&this.addHandles(this.scheduler.registerTask(this.task,this)),this.runTask(),this.map){const t=()=>this._setDirty();this.addHandles(i(()=>this.map?.ground?.layers,"change",t,{onListenerAdd:t,onListenerRemove:t}))}this._updateRenderLocation()}destroy(){this._cancelPendingRequest(),this._propertiesPool=e(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t}get scale(){const t=this._camera,e=n(t.eye,this.renderLocation),r={renderCoordsHelper:this.renderCoordsHelper,state:{camera:t}};return h(r,e)}get updating(){return this._dirty||null!=this._elevationQueryController}updateRenderLocation(){this._setDirty(),this._updateRenderLocation()}_setDirty(){this._dirty||(this._dirty=!0,this.notifyChange("updating"))}_cancelPendingRequest(){const t=this._elevationQueryController;t&&(this._elevationQueryController=null,t.abort(),this.notifyChange("updating"))}get readyToRun(){return!this._elevationQueryController&&this._dirty}runTask(){if(this._cancelPendingRequest(),this._dirty=!1,this.notifyChange("updating"),!this.map?.ground)return this._updateSurfaceAltitude(0),m;const t=this.state.spatialReference;this._tmpPoint.spatialReference=t,this.renderCoordsHelper.fromRenderCoords(this._camera.eye,this._tmpPoint);const e=(this._tmpPoint.z??0)>f&&1===this.renderCoordsHelper.viewingMode&&(t.isWGS84||t.isWebMercator);let i=new AbortController;return this.map.ground.queryElevation(this._tmpPoint,{signal:i.signal,cache:this.cache,minDemResolution:e?g:0}).then(t=>this._updateSurfaceAltitude(t.geometry.z??0)).catch(t=>{r(t)||this._updateSurfaceAltitude(0)}).finally(()=>{this._elevationQueryController===i&&(this._elevationQueryController=null,this.notifyChange("updating")),i=null}),this._elevationQueryController=i,this.notifyChange("updating"),m}_updateSurfaceAltitude(t){this._estimatedSurfaceAltitude!==t&&(this._estimatedSurfaceAltitude=t,this._updateRenderLocation())}_updateRenderLocation(){this.renderCoordsHelper.setAltitude(y,this._estimatedSurfaceAltitude,this._camera.eye),a(this._get("renderLocation"),y)||(this._set("renderLocation",l(this._propertiesPool.get("renderLocation"),y)),this.notifyChange("renderLocation"))}};t([o({constructOnly:!0})],_.prototype,"scheduler",void 0),t([o({constructOnly:!0})],_.prototype,"cache",void 0),t([o({constructOnly:!0})],_.prototype,"map",void 0),t([o({constructOnly:!0})],_.prototype,"task",void 0),t([o()],_.prototype,"location",null),t([o()],_.prototype,"renderLocation",void 0),t([o()],_.prototype,"scale",null),t([o()],_.prototype,"updating",null),_=t([s("esri.views.3d.support.pointsOfInterest.CameraOnSurface")],_);const y=d(),f=1e5,g=1e6;export{_ as CameraOnSurface};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{exactEquals as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ComponentTechnique as
|
|
2
|
+
import{exactEquals as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ComponentTechnique as t}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as s}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as i}from"../../../core/material/MaterialBase.js";import{isColor as o}from"../../../core/shaderLibrary/ShaderOutput.js";class a extends i{constructor(e,r,t,i,o){super(),this.parameters=e,this.key=o,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this.hasEmissions=u(e,t,i),this.materialPass=n(e,t),this._configuration=new s(i.sphericalSR),this._initializeMaterialConfiguration(e,r,t,i)}destroy(){}acquireTechnique(e,r,s,i){const o=this._updateConfiguration(r,s);return e.get(t,o,i.layout)}_initializeMaterialConfiguration(e,r,t,s){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=r.hasVertexColors,i.textureCoordinateType=r.textureCoordinateType,i.shadeNormals=r.shadeNormals,i.normalType=r.hasNormals?1:2,i.hasPolygonOffset=e.polygonOffsetEnabled,i.hasModelRotationScale=r.hasModelRotationScale,i.componentDataType=t.componentDataType,i.emissionSource=c(e,t,s)}_updateConfiguration(e,r){const t=this._configuration,{identifier:s,output:i}=e,a=0===s;t.output=i,t.hasEmission=r.hasEmission&&a,t.renderOccluded=10===r.slot,t.oitPass=a?r.oitPass:0,t.terrainDepthTest=a&&r.terrainDepthTest,t.cullAboveTerrain=!!a&&r.cullAboveTerrain;const n=this.isIntegratedMesh?d(r)?h(r)?3:2:1:0;t.integratedMeshMode=n,t.pbrMode=3===n?4:this.usePBR?this.hasParametersFromSource?0!==t.shadeNormals&&this.isIntegratedMesh?0:2:1:0,t.hasSlicePlane=null!=r.slicePlane&&this.slicePlaneEnabled,t.isGroundSlice=t.hasSlicePlane&&this.isGround;const{materialPass:l}=this;t.blendingEnabled=a&&(1===l||2===l&&e.transparent||4===l)||t.isGroundSlice,t.hasHighlightMixTexture=2===s&&null!=r.highlightMixTexture,t.snowCover=a&&r.snowCover>0,t.vertexDiscardMode=a&&2===l?e.transparent?2:1:0;const u=a&&o(i);return t.receiveAmbientOcclusion=u&&this.applySSAO&&null!=r.ssao?.getTexture(),t.hasOccludees=u&&r.hasOccludees,t.receiveShadows=u&&r.shadowMap.ready,t.screenSpaceReflections=u&&null!=r.ssr.lastFrameColor,t.cloudReflections=u&&null!=r.clouds.data?.cubeMap?.colorTexture,t}}function n(e,r){const{alphaDiscardMode:t,isIntegratedMesh:s,slicePlaneEnabled:i}=e,{transparent:o,opaqueOverride:a}=r,n=e.opacity<1,l=e.baseColor[3]<1;if(s)return n||i?4:3;if(n)return 1;if(0===a)return 0;if(l||0===t||3===t)return 1;switch(o){case 2:return 0;case 0:return 1;case 1:return 2}}function l(t){return null!=t.emissionTexture||!e(t.emissiveBaseColor,r)}function u(e,r,t){const s=l(e);return t.floatBufferBlendSupported&&2!==r.emissiveOverride&&(s||2!==r.emissiveSourceOverride)}function c(e,r,t){const s=null!=e.emissionTexture,{emissiveSourceOverride:i}=r,o=1===i,a=2===i,n=u(e,r,t),c=l(e);return n?c?a?s?4:2:o?s?5:7:6:o?7:6:0}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}export{a as ComponentMaterial,c as calculateEmissionSource,u as calculateHasEmissions,l as calculateHasEmissiveBase,n as computeMaterialPass};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrOLID as
|
|
2
|
+
import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrOLID as e,isDepth as r,is2DGeometryOutput as s,isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import a from"../lib/GLMaterial.js";import{DefaultBufferWriter as o}from"./DefaultBufferWriter.js";import{TriangleMaterial as n}from"./TriangleMaterial.js";import{VisualVariablePassParameters as h}from"./VisualVariablePassParameters.js";import{getLayout as p,ColorMaterialTechnique as u}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as c}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as l}from"../../../../webscene/support/AlphaCutoff.js";class f extends n{constructor(t){super(t,g),this._configuration=new c,this.supportsEdges=!0,this.produces=new Map([[2,t=>this._isOpaqueMaterialPass(t)],[3,t=>this._isOpaqueNoSSAODepthPass(t)],[4,t=>e(t)&&this._transparent&&this.parameters.writeDepth],[5,t=>r(t)&&this._transparent&&this.parameters.writeDepth],[9,t=>e(t)&&this._transparent&&!this.parameters.writeDepth],[20,t=>s(t)]])}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this._transparent,this._configuration.discardInvisibleFragments=this._transparent&&!this._isOpaquePass(t)&&this.parameters.discardInvisibleFragments,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=e.hasOccludees,this._configuration.enableOffset=e.enableOffset,this._configuration.terrainDepthTest=e.terrainDepthTest&&i(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration}get visible(){return this.parameters.color[3]>=l}get _transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}get hasEmissions(){return this.parameters.emissiveStrength>0}_isOpaquePass(t){return i(t)||this._isOpaqueMaterialPass(t)||this._isOpaqueNoSSAODepthPass(t)}_isOpaqueMaterialPass(t){return 8===t||e(t)&&!this._transparent}_isOpaqueNoSSAODepthPass(t){return r(t)&&this.parameters.writeDepth&&!this._transparent}createGLMaterial(t){return new m(t)}createBufferWriter(){return new o(p(this.parameters))}}class m extends a{beginSlot(t){return this.getTechnique(u,t)}}class g extends h{constructor(){super(...arguments),this.color=t,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=0,this.draped=!1,this.discardInvisibleFragments=!1,this.emissiveStrength=0}}export{f as ColorMaterial,g as Parameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as a,isColor as u,isDepth as l,isColorHighlightOrOLID as f}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as p}from"./DefaultBufferWriter.js";import{TriangleMaterial as m}from"./TriangleMaterial.js";import{VisualVariablePassParameters as g}from"./VisualVariablePassParameters.js";import{writeAttributes as d,writeBufferVec4 as b,writeColor as x,writeVVFeatureAttribute as y}from"./internal/bufferWriterUtils.js";import{getLayout as j,getTextureLayout as _}from"../shaders/PatternLayouts.js";import{PatternTechnique as v}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as C}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as w}from"../../../../webscene/support/AlphaCutoff.js";class B extends m{constructor(e){super(e,
|
|
2
|
+
import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as a,isColor as u,isDepth as l,isColorHighlightOrOLID as f}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as p}from"./DefaultBufferWriter.js";import{TriangleMaterial as m}from"./TriangleMaterial.js";import{VisualVariablePassParameters as g}from"./VisualVariablePassParameters.js";import{writeAttributes as d,writeBufferVec4 as b,writeColor as x,writeVVFeatureAttribute as y}from"./internal/bufferWriterUtils.js";import{getLayout as j,getTextureLayout as _}from"../shaders/PatternLayouts.js";import{PatternTechnique as v}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as C}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as w}from"../../../../webscene/support/AlphaCutoff.js";class B extends m{constructor(e){super(e,P),this._configuration=new C,this.supportsEdges=!0,this.produces=new Map([[2,e=>a(e)],[4,e=>u(e)],[5,e=>l(e)],[20,e=>this.parameters.draped&&f(e)]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.enableOffset=t.enableOffset,this._configuration.terrainDepthTest=t.terrainDepthTest&&u(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration}get visible(){return this.parameters.color[3]>=w}get hasEmissions(){return this.parameters.emissiveStrength>0}createGLMaterial(e){return new F(e)}createBufferWriter(){return new S(j(this.parameters),_(this.parameters))}}class F extends c{beginSlot(e){return this.getTechnique(v,e)}}class S extends p{constructor(e,t){super(e),this.textureBufferLayout=t}elementCountTextureBuffer(e){return e.get("boundingRect")?.indices.length??0}write(e,t,i,o,n,a,u){const l=d(i,o,this.layout,e,t,n,a);for(const s of this.layout.fields.keys()){const e=i.get(s),t=e?.indices;if(e&&t)switch(s){case"uvMapSpace":{h(4===e.size);const t=n.getField(s,r);t&&b(e,t,a);break}}}const{textureBufferLayout:f}=this;if(null==f)return l;h(null!=u,"Using a texture layout, but the texture range for this instance was not provided");const c=u.from;h(1===u.numElements,"Provided more than one texture buffer element per polygon");const p=n.getField("textureElementIndex",s);h(null!=p,"Missing component index field");const m=i.get("position")?.indices.length??0;for(let r=0;r<m;++r)p.set(a+r,c);return l}writeTextureBuffer(t,r,s,a,u){const{textureBufferLayout:l}=this;if(null==l)return;const f=a.getField("boundingRect",i),c=s.get("boundingRect");f&&c&&(h(9===c.size),T(c,t??e,f,u));const p=a.getField("color",o),m=s.get("color");p&&m&&(h(3===m.size||4===m.size),x(m,m.size,p,u));const g=a.getField("colorFeatureAttribute",n),d=s.get("colorFeatureAttribute");g&&d&&(h(1===d.size),y(d,g,u))}}function T(e,t,r,s){const{data:i,indices:o}=e,n=t,a=r.typedBuffer,u=r.typedBufferStride,l=o.length;s*=u;for(let f=0;f<l;++f){const e=9*o[f],t=i[e],r=i[e+1],l=i[e+2];a[s]=n[0]*t+n[4]*r+n[8]*l+n[12],a[s+1]=n[1]*t+n[5]*r+n[9]*l+n[13],a[s+2]=n[2]*t+n[6]*r+n[10]*l+n[14];for(let o=3;o<9;++o)a[s+o]=i[e+o];s+=u}}class P extends g{constructor(){super(...arguments),this.color=t(1,1,1,1),this.emissiveStrength=0,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=0,this.hasOccludees=!1,this.style=2,this.draped=!0}}export{P as Parameters,B as PatternMaterial};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{nextHighestPowerOfTwo as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{copy as r,invert as o,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as a}from"../../../support/buffer/glUtil.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{getMaxItemCount as i,getMaxByteSize as u}from"../../lib/TextureBackedBuffer/TextureBackedBufferUtils.js";import{TextureBuffer as c}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{bufferRangePool as m}from"./BufferRange.js";import{DrawCommand as g}from"./DrawCommand.js";import{BaseInstanceData as l}from"./PerBaseInstanceData.js";import{VertexBuffer as h}from"../../../../webgl/VertexBuffer.js";class y{constructor(t,e){this._rctx=e;const r=t.createBufferWriter();this._bufferWriter=r,this._vaoCache=e.getVaoCache(a(r.layout));const o=["geometry"];"textureBufferLayout"in r&&null!=r.textureBufferLayout&&o.push("texture"),this.targetBuffers=o}maxElements(t){if("texture"===t){const t=this._targetLayout("texture");return null==t?0:i(this._rctx,t)}return Math.floor(x/this._targetStrideBytes(t))}_targetStrideBytes(t){return this._targetLayout(t)?.stride??0}_targetLayout(t){return"geometry"===t?this._bufferWriter.layout:"baseInstance"===t?this._bufferWriter.baseInstanceLayout:this._bufferWriter.textureBufferLayout}evaluateBufferAllocation(t,e,r,o){const s=this._targetStrideBytes("geometry"),n=e.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),a=r.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),f=Math.min((t+n-a)*s,x),i=o.vao?.buffer("geometry"),u=i?.sizeBytes??0;return f>b&&f<u/2?0:f>u?1:2}deleteBuffer(t){if(t.isInstanced)return t.instancedCommandVAOs?.dispose(),t.vao?.buffer("geometry")?.dispose(),t.vao?.disposeVAOOnly(),void(t.vao=null);this._vaoCache.deleteVao(t.vao),t.vaoEndElement=0,t.textureBuffer=e(t.textureBuffer),t.textureEndElement=0}createBaseInstanceData(t){const{_bufferWriter:e}=this;if(null==t||null==e.baseInstanceLayout||null==e.writeBaseInstance||null==e.elementCountBaseInstance)return null;const r=this._targetLayout("baseInstance"),o=e.elementCountBaseInstance(t.attributes),s=o*r.stride,n=new h(this._rctx,a(r));n.setSize(Math.ceil(s));const f=S(s),i=r.createView(f.buffer);e.writeBaseInstance(t.attributes,i),n.setSubData(f,0,0,s);const u=new g;return u.first=0,u.count=o,new l(t,n,u)}_allocateInstanceBuffer(t){const e=this._bufferWriter.layout,r=t*this._targetStrideBytes("geometry"),o=new h(this._rctx,a(e,1));return o.setSize(v(r)),o}_createInstancedVao(t,e){return new f(this._rctx,new Map([["baseInstance",t],["geometry",e]]))}reallocateBuffer(t,e,r){if(this.deleteBuffer(e),null!=t){const o=t.baseInstanceBuffer,s=this._allocateInstanceBuffer(r.geometry);e.vao=this._createInstancedVao(o,s)}else{const t=r.geometry*this._targetStrideBytes("geometry");e.vao=this._vaoCache.newVao(v(t))}const o=this._targetLayout("texture");if(null!=o){const t=v(r.texture*o.stride),s=Math.ceil(t/o.stride);e.textureBuffer=new c(this._rctx,o,s)}e.vaoEndElement=Math.floor((e.vao?.getByteLength("geometry")??0)/this._targetStrideBytes("geometry")),e.textureEndElement=e.textureBuffer?.itemCount??0}elementCount(t,e){const{attributes:r}=t;return"geometry"===e?this._bufferWriter.elementCount(r):"baseInstance"===e?this._bufferWriter.elementCountBaseInstance?.(r)??0:this._bufferWriter.elementCountTextureBuffer?.(r)??0}vertexElementCount(t){return this._bufferWriter.elementCount(t.attributes)}textureElementCount(t){return this._bufferWriter.elementCountTextureBuffer?.(t.attributes)??0}canGrow(t,e){const r=this.targetBuffers.map(r=>this._evaluateTargetBufferGrowth(r,t,e));return r.every(({canGrow:t})=>t)&&r.some(({needsToGrow:t})=>t)}_evaluateTargetBufferGrowth(t,e,r){const o=this._targetLayout(t),s=e.getTargetBuffer(t);if(null==o||null==s)return{needsToGrow:null!=o,canGrow:!0};return{needsToGrow:r[t]*o.stride>s.sizeBytes,canGrow:"geometry"===t?s.sizeBytes<v(x-b):s.sizeBytes<u(this._rctx,o)}}clearHoles(t,e){for(const r of this.targetBuffers){const o=this._targetStrideBytes(r),s=t[r],n=s.reduce((t,e)=>Math.max(t,e.numElements),0)*o,a=S(n);a.fill(0,0,n);for(const t of s)this._setTargetSubData(r,e,o,t,a)}}clearHolesMetal(t,e,r){const{targetBuffers:o}=this,s={};let n=0;for(const i of o){const t=e[i].numElements*this._targetStrideBytes(i);s[i]=n,n+=t}const a=S(n);a.fill(0,0,n);const f={};for(const i of o)f[i]=this._targetLayout(i)?.createView(a.buffer,s[i]);for(const i of t){const t=i.targetRanges.geometry;if(!(t.from>=e.geometry.from&&t.to<=e.geometry.to))continue;const r={};for(const s of o)r[s]=i.targetRanges[s].from-e[s].from;this._writeGeometry(i.geometry,f,r,i.targetRanges)}for(const i of o)this._setTargetSubData(i,r,this._targetStrideBytes(i),e[i],a,s[i])}writeRandomInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={},f={};let i=0;for(const g of o)s[g]=t[g]*this._targetStrideBytes(g),n[g]=i,a[g]=0,f[g]=m.acquire(0,0),i+=s[g];const u=S(i),c={};for(const m of o)c[m]=this._targetLayout(m)?.createView(u.buffer,n[m]);for(const m of e){for(const t of o){const e=m.targetRanges[t],o=f[t];o.to===e.from||(o.numElements>0&&this._setTargetSubData(t,r,this._targetStrideBytes(t),f[t],u,n[t]),o.from=e.from,a[t]=0)}this._writeGeometry(m.geometry,c,a,m.targetRanges);for(const t of o){const e=m.targetRanges[t];a[t]+=e.numElements,f[t].to=e.to}}for(const g of o){const t=f[g];t.numElements>0&&this._setTargetSubData(g,r,this._targetStrideBytes(g),t,u,n[g]),m.release(f[g])}}writeInstanceRangeMetal(t,e,r){const{targetBuffers:o}=this,s={},n={};let a=0;for(const u of o)s[u]=t[u].numElements*this._targetStrideBytes(u),n[u]=a,a+=s[u];const f=S(a),i={};for(const u of o)i[u]=this._targetLayout(u)?.createView(f.buffer,n[u]);f.fill(0,0,a);for(const u of e){const e=u.targetRanges.geometry;if(!(e.from>=t.geometry.from&&e.to<=t.geometry.to))continue;const r={},s={};for(const n of o){const e=u.targetRanges[n];r[n]=e.from-t[n].from,s[n]=e}this._writeGeometry(u.geometry,i,r,s)}for(const u of o)t[u].numElements>0&&this._setTargetSubData(u,r,this._targetStrideBytes(u),t[u],f,n[u])}rebuildInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={};let f=0;for(const c of o)s[c]=t[c]*this._targetStrideBytes(c),n[c]=f,f+=s[c],a[c]=0;const i=S(f),u={};for(const c of o)u[c]=this._targetLayout(c)?.createView(i.buffer,n[c]);for(const c of e){const t={},e={};for(const r of o){t[r]=a[r],a[r]+=this.elementCount(c.geometry.geometry,r);const o=c.targetRanges[r];o.from=t[r],o.to=a[r],e[r]=o}this._writeGeometry(c.geometry,u,t,e)}for(const c of o){const t=m.acquire(0,a[c]);this._setTargetSubData(c,r,this._targetStrideBytes(c),t,i,n[c]),m.release(t)}return a}updateInstance(t,e){const{targetBuffers:r}=this,o={},s={};let n=0;for(const
|
|
2
|
+
import{nextHighestPowerOfTwo as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{copy as r,invert as o,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as a}from"../../../support/buffer/glUtil.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{getMaxItemCount as i,getMaxByteSize as u}from"../../lib/TextureBackedBuffer/TextureBackedBufferUtils.js";import{TextureBuffer as c}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{bufferRangePool as m}from"./BufferRange.js";import{DrawCommand as g}from"./DrawCommand.js";import{BaseInstanceData as l}from"./PerBaseInstanceData.js";import{VertexBuffer as h}from"../../../../webgl/VertexBuffer.js";class y{constructor(t,e){this._rctx=e;const r=t.createBufferWriter();this._bufferWriter=r,this._vaoCache=e.getVaoCache(a(r.layout));const o=["geometry"];"textureBufferLayout"in r&&null!=r.textureBufferLayout&&o.push("texture"),this.targetBuffers=o}maxElements(t){if("texture"===t){const t=this._targetLayout("texture");return null==t?0:i(this._rctx,t)}return Math.floor(x/this._targetStrideBytes(t))}_targetStrideBytes(t){return this._targetLayout(t)?.stride??0}_targetLayout(t){return"geometry"===t?this._bufferWriter.layout:"baseInstance"===t?this._bufferWriter.baseInstanceLayout:this._bufferWriter.textureBufferLayout}evaluateBufferAllocation(t,e,r,o){const s=this._targetStrideBytes("geometry"),n=e.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),a=r.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),f=Math.min((t+n-a)*s,x),i=o.vao?.buffer("geometry"),u=i?.sizeBytes??0;return f>b&&f<u/2?0:f>u?1:2}deleteBuffer(t){if(t.isInstanced)return t.instancedCommandVAOs?.dispose(),t.vao?.buffer("geometry")?.dispose(),t.vao?.disposeVAOOnly(),void(t.vao=null);this._vaoCache.deleteVao(t.vao),t.vaoEndElement=0,t.textureBuffer=e(t.textureBuffer),t.textureEndElement=0}createBaseInstanceData(t){const{_bufferWriter:e}=this;if(null==t||null==e.baseInstanceLayout||null==e.writeBaseInstance||null==e.elementCountBaseInstance)return null;const r=this._targetLayout("baseInstance"),o=e.elementCountBaseInstance(t.attributes),s=o*r.stride,n=new h(this._rctx,a(r));n.setSize(Math.ceil(s));const f=S(s),i=r.createView(f.buffer);e.writeBaseInstance(t.attributes,i),n.setSubData(f,0,0,s);const u=new g;return u.first=0,u.count=o,new l(t,n,u)}_allocateInstanceBuffer(t){const e=this._bufferWriter.layout,r=t*this._targetStrideBytes("geometry"),o=new h(this._rctx,a(e,1));return o.setSize(v(r)),o}_createInstancedVao(t,e){return new f(this._rctx,new Map([["baseInstance",t],["geometry",e]]))}reallocateBuffer(t,e,r){if(this.deleteBuffer(e),null!=t){const o=t.baseInstanceBuffer,s=this._allocateInstanceBuffer(r.geometry);e.vao=this._createInstancedVao(o,s)}else{const t=r.geometry*this._targetStrideBytes("geometry");e.vao=this._vaoCache.newVao(v(t))}const o=this._targetLayout("texture");if(null!=o){const t=v(r.texture*o.stride),s=Math.ceil(t/o.stride);e.textureBuffer=new c(this._rctx,o,s)}e.vaoEndElement=Math.floor((e.vao?.getByteLength("geometry")??0)/this._targetStrideBytes("geometry")),e.textureEndElement=e.textureBuffer?.itemCount??0}elementCount(t,e){const{attributes:r}=t;return"geometry"===e?this._bufferWriter.elementCount(r):"baseInstance"===e?this._bufferWriter.elementCountBaseInstance?.(r)??0:this._bufferWriter.elementCountTextureBuffer?.(r)??0}vertexElementCount(t){return this._bufferWriter.elementCount(t.attributes)}textureElementCount(t){return this._bufferWriter.elementCountTextureBuffer?.(t.attributes)??0}canGrow(t,e){const r=this.targetBuffers.map(r=>this._evaluateTargetBufferGrowth(r,t,e));return r.every(({canGrow:t})=>t)&&r.some(({needsToGrow:t})=>t)}_evaluateTargetBufferGrowth(t,e,r){const o=this._targetLayout(t),s=e.getTargetBuffer(t);if(null==o||null==s)return{needsToGrow:null!=o,canGrow:!0};return{needsToGrow:r[t]*o.stride>s.sizeBytes,canGrow:"geometry"===t?s.sizeBytes<v(x-b):s.sizeBytes<u(this._rctx,o)}}clearHoles(t,e){for(const r of this.targetBuffers){const o=this._targetStrideBytes(r),s=t[r],n=s.reduce((t,e)=>Math.max(t,e.numElements),0)*o,a=S(n);a.fill(0,0,n);for(const t of s)this._setTargetSubData(r,e,o,t,a)}}clearHolesMetal(t,e,r){const{targetBuffers:o}=this,s={};let n=0;for(const i of o){const t=e[i].numElements*this._targetStrideBytes(i);s[i]=n,n+=t}const a=S(n);a.fill(0,0,n);const f={};for(const i of o)f[i]=this._targetLayout(i)?.createView(a.buffer,s[i]);for(const i of t){const t=i.targetRanges.geometry;if(!(t.from>=e.geometry.from&&t.to<=e.geometry.to))continue;const r={};for(const s of o)r[s]=i.targetRanges[s].from-e[s].from;this._writeGeometry(i.geometry,f,r,i.targetRanges)}for(const i of o)this._setTargetSubData(i,r,this._targetStrideBytes(i),e[i],a,s[i])}writeRandomInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={},f={};let i=0;for(const g of o)s[g]=t[g]*this._targetStrideBytes(g),n[g]=i,a[g]=0,f[g]=m.acquire(0,0),i+=s[g];const u=S(i),c={};for(const m of o)c[m]=this._targetLayout(m)?.createView(u.buffer,n[m]);for(const m of e){for(const t of o){const e=m.targetRanges[t],o=f[t];o.to===e.from||(o.numElements>0&&this._setTargetSubData(t,r,this._targetStrideBytes(t),f[t],u,n[t]),o.from=e.from,a[t]=0)}this._writeGeometry(m.geometry,c,a,m.targetRanges);for(const t of o){const e=m.targetRanges[t];a[t]+=e.numElements,f[t].to=e.to}}for(const g of o){const t=f[g];t.numElements>0&&this._setTargetSubData(g,r,this._targetStrideBytes(g),t,u,n[g]),m.release(f[g])}}writeInstanceRangeMetal(t,e,r){const{targetBuffers:o}=this,s={},n={};let a=0;for(const u of o)s[u]=t[u].numElements*this._targetStrideBytes(u),n[u]=a,a+=s[u];const f=S(a),i={};for(const u of o)i[u]=this._targetLayout(u)?.createView(f.buffer,n[u]);f.fill(0,0,a);for(const u of e){const e=u.targetRanges.geometry;if(!(e.from>=t.geometry.from&&e.to<=t.geometry.to))continue;const r={},s={};for(const n of o){const e=u.targetRanges[n];r[n]=e.from-t[n].from,s[n]=e}this._writeGeometry(u.geometry,i,r,s)}for(const u of o)t[u].numElements>0&&this._setTargetSubData(u,r,this._targetStrideBytes(u),t[u],f,n[u])}rebuildInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={};let f=0;for(const c of o)s[c]=t[c]*this._targetStrideBytes(c),n[c]=f,f+=s[c],a[c]=0;const i=S(f),u={};for(const c of o)u[c]=this._targetLayout(c)?.createView(i.buffer,n[c]);for(const c of e){const t={},e={};for(const r of o){t[r]=a[r],a[r]+=this.elementCount(c.geometry.geometry,r);const o=c.targetRanges[r];o.from=t[r],o.to=a[r],e[r]=o}this._writeGeometry(c.geometry,u,t,e)}for(const c of o){const t=m.acquire(0,a[c]);this._setTargetSubData(c,r,this._targetStrideBytes(c),t,i,n[c]),m.release(t)}return a}updateInstance(t,e){const{targetBuffers:r}=this,o={},s={};let n=0;for(const u of r){const e=this._targetStrideBytes(u);o[u]=this.elementCount(t.geometry.geometry,u)*e,s[u]=n,n+=o[u]}const a=S(n),f={},i={};for(const u of r)i[u]=0,f[u]=this._targetLayout(u)?.createView(a.buffer,s[u]);this._writeGeometry(t.geometry,f,i,t.targetRanges);for(const u of r)this._setTargetSubData(u,e,this._targetStrideBytes(u),t.targetRanges[u],a,s[u])}updateInstancesMetal(t){const{targetBuffers:e}=this;for(const[r,o]of t){const t={};for(const r of e)t[r]=m.acquire(1/0,-1/0);for(const r of o)for(const o of e){const e=t[o],s=r.targetRanges[o];e.from=Math.min(e.from,s.from),e.to=Math.max(e.to,s.to)}this.writeInstanceRangeMetal(t,r.instances.values(),r);for(const r of e)m.release(t[r])}}_writeGeometry(t,e,n,a){const{_bufferWriter:f}=this;null!=f&&(r(B,t.transformation),B[12]-=t.localOrigin.vec3[0],B[13]-=t.localOrigin.vec3[1],B[14]-=t.localOrigin.vec3[2],o(_,B),s(_,_),f.write(B,_,t.geometry.attributes,t.geometry.olidColor,e.geometry,n.geometry,a.texture),null!=e.texture&&f.writeTextureBuffer&&f.writeTextureBuffer(B,_,t.geometry.attributes,e.texture,n.texture))}_setTargetSubData(t,e,r,o,s,n=0){if("geometry"===t){const a=e.getTargetBuffer(t);a?.setSubData(s,o.from*r,n,o.numElements*r)}else if("texture"===t){const r=e.getTargetBuffer(t);r?.setSubData(s.buffer,o.from,n,o.numElements)}}static prune(){w=new Uint8Array(b)}}const B=n(),_=n(),b=262144,d=1024,x=16777216;let w=new Uint8Array(b);function S(t){return w.byteLength<t&&(w=new Uint8Array(t)),w}function v(e){return e<=d?d:e<b?t(e):Math.max(Math.min(Math.ceil(1.5*e/b)*b,x),e)}export{y as VaoWriter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{parameter as
|
|
2
|
+
import{__decorate as t}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as e}from"../materials/DefaultTechniqueConfiguration.js";class i extends e{constructor(){super(...arguments),this.cullFace=0,this.emissionSource=0,this.hasVertexColors=!1,this.transparent=!1,this.discardInvisibleFragments=!1,this.polygonOffset=!1,this.enableOffset=!0,this.writeDepth=!0,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasVVColor=!1,this.draped=!1,this.textureCoordinateType=0,this.occlusionPass=!1,this.olidColorInstanced=!1,this.hasVVInstancing=!1,this.hasVVSize=!1,this.hasVVOpacity=!1,this.snowCover=!1}}t([o({count:3})],i.prototype,"cullFace",void 0),t([o({count:8})],i.prototype,"emissionSource",void 0),t([o()],i.prototype,"hasVertexColors",void 0),t([o()],i.prototype,"transparent",void 0),t([o()],i.prototype,"discardInvisibleFragments",void 0),t([o()],i.prototype,"polygonOffset",void 0),t([o()],i.prototype,"enableOffset",void 0),t([o()],i.prototype,"writeDepth",void 0),t([o()],i.prototype,"hasOccludees",void 0),t([o()],i.prototype,"terrainDepthTest",void 0),t([o()],i.prototype,"cullAboveTerrain",void 0),t([o()],i.prototype,"hasVVColor",void 0),t([o()],i.prototype,"draped",void 0);export{i as ColorMaterialTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{parameter as
|
|
2
|
+
import{__decorate as t}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as e}from"../materials/DefaultTechniqueConfiguration.js";class s extends e{constructor(){super(...arguments),this.cullFace=0,this.style=0,this.emissionSource=0,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasOccludees=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasVVColor=!1,this.draped=!1,this.textureCoordinateType=0,this.discardInvisibleFragments=!0,this.writeDepth=!0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasVVSize=!1,this.hasVVOpacity=!1,this.overlayEnabled=!1,this.snowCover=!1}}function i(t,o,e,s){return t.draped?null:t.hasVVColor?s:t.hasVertexColors?e:o}t([o({count:3})],s.prototype,"cullFace",void 0),t([o({count:6})],s.prototype,"style",void 0),t([o({count:8})],s.prototype,"emissionSource",void 0),t([o()],s.prototype,"hasVertexColors",void 0),t([o()],s.prototype,"polygonOffset",void 0),t([o()],s.prototype,"hasOccludees",void 0),t([o()],s.prototype,"enableOffset",void 0),t([o()],s.prototype,"terrainDepthTest",void 0),t([o()],s.prototype,"cullAboveTerrain",void 0),t([o()],s.prototype,"hasVVColor",void 0),t([o()],s.prototype,"draped",void 0);export{s as PatternTechniqueConfiguration,i as selectByPatternConfiguration};
|
package/views/Attribution.js
CHANGED
|
@@ -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{makeHandle as s}from"../core/handleUtils.js";import{isActivationKey as i}from"../core/keyboard.js";import{watch as o,initial as r}from"../core/reactiveUtils.js";import{renderingSanitizer as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Accessor.js";import{makeHandle as s}from"../core/handleUtils.js";import{isActivationKey as i}from"../core/keyboard.js";import{watch as o,initial as r}from"../core/reactiveUtils.js";import{renderingSanitizer as n}from"../core/sanitizerUtils.js";import{addFrameTask as a}from"../core/scheduling.js";import{property as h,subclass as c}from"../core/accessorSupport/decorators.js";import{getCalciteModeClassName as d,setCalciteModeClass as l}from"../support/modeUtils.js";import{globalCss as p}from"../widgets/support/globalCss.js";const u="esri-attribution",_={poweredBy:`${u}__powered-by`,sources:`${u}__sources`,sourcesOpen:`${u}__sources--open`,link:`${u}__link`};let m=class extends t{constructor(e){super(e),this._previousSourceHeight=0,this._opened=!1,this._overflowing=!1,this._changeSet=new Set,this.height=0,this._toggleState=()=>{(this._opened||this._overflowing)&&(this._opened=!this._opened,this._invalidate("opened"))},this.surface=document.createElement("div"),this._task=a({render:()=>{this._update(),this._task.pause(),this._changeSet.clear()}}),this.addHandles(this._task)}appendBefore(e,t){e.insertBefore(this.surface,t),this._invalidate("mode")}initialize(){const e=document.createElement("div");e.setAttribute("dir","ltr"),e.classList.add("esri-widget","esri-view-attribution","esri-attribution"),this._set("surface",e);const t=new ResizeObserver(()=>{this.height=e.clientHeight});t.observe(e),this.addHandles(s(()=>t.disconnect())),e.innerHTML=`\n <div class="${_.sources}"></div>\n <div class="${_.poweredBy}">\n Powered by\n <a class="${_.link}" href="https://www.esri.com/" rel="noreferrer" target="_blank">Esri</a>\n </div>`,this.addHandles([this.surface,o(()=>this.attributionItems,()=>this._invalidate("attributionItems"),r),o(()=>this.mode,()=>this._invalidate("mode"),r)]);const n=e.querySelector(`.${_.sources}`);this._previousSourceHeight=n.clientHeight;const a=new ResizeObserver(()=>{this._invalidate("overflow")});a.observe(n),this.addHandles(s(()=>a.disconnect()));const h=new MutationObserver(()=>{this._invalidate("overflow")});h.observe(n,{childList:!0,subtree:!0,characterData:!0}),this.addHandles(s(()=>h.disconnect())),n.onclick=this._toggleState,n.onkeydown=e=>{i(e.key)&&(e.preventDefault(),this._toggleState())}}_invalidate(e){this._changeSet.add(e),this._task.resume()}_update(){const e=this.surface.querySelector(`.${_.sources}`);if(this._changeSet.has("overflow")){const{clientHeight:t,clientWidth:s,scrollWidth:i}=e,o=t<this._previousSourceHeight;this._previousSourceHeight=t,this._opened?o&&(this._opened=!1):o||(this._overflowing=i>s)}if(this._changeSet.has("overflow")||this._changeSet.has("opened")){const t=this._opened||this._overflowing,s=t?"0":"";e.setAttribute("tabindex",s),e.classList.toggle(p.interactive,t),e.classList.toggle(_.sourcesOpen,this._opened)}this._changeSet.has("attributionItems")&&(e.innerHTML=n.sanitize(this.attributionItems?.map(e=>e.text).join(" | ")??"")),this._changeSet.has("mode")&&(this.surface.classList.remove(d("light"),d("dark")),this.mode?this.surface.classList.add(d(this.mode)):l(this.surface))}};e([h()],m.prototype,"attributionItems",void 0),e([h()],m.prototype,"height",void 0),e([h({type:["dark","light"]})],m.prototype,"mode",void 0),e([h({readOnly:!0})],m.prototype,"surface",void 0),m=e([c("esri.views.Attribution")],m);export{m as Attribution};
|
package/views/DOMContainer.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{byId as e,reparent as i}from"../core/domUtils.js";import{on as s}from"../core/events.js";import{makeHandle as r}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as o,removeMaybe as a}from"../core/maybe.js";import{watch as h,initial as d,syncAndInitial as l}from"../core/reactiveUtils.js";import{addFrameTask as u}from"../core/scheduling.js";import{property as c,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as m}from"./Attribution.js";import f from"./overlay/ViewOverlay.js";const _=[0,0];function y(t){const e=(t.ownerDocument||window.document).defaultView,i=t.getBoundingClientRect();return _[0]=i.left+(e?.pageXOffset??0),_[1]=i.top+(e?.pageYOffset??0),_}function g(t){t&&(t.textContent="",t.parentNode&&t.parentNode.removeChild(t))}const v="test"===process.env.NODE_ENV,b=v?0:16,w=v?0:750,C=v?0:512,H=2,O=_=>{const v=_;let O=class extends v{constructor(...t){super(...t),this._freqInfo={freq:b,time:w},this._overlayRenderTaskHandle=null,this.aria={},this.attributionMode=null,this.height=0,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([h(()=>this.cursor,t=>{const{surface:e}=this;e&&e.setAttribute("data-cursor",t)}),h(()=>this.navigating,t=>{const{surface:e}=this;e&&e.setAttribute("data-navigating",t.toString())}),h(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0})])}initialize(){const t=this;this.addHandles([h(()=>this.ui,(t,e)=>this._handleUIChange(t,e),d),t.on("focus",()=>this.notifyChange("focused")),t.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get("container")??null}set container(t){const s=this._get("container"),r=e(t);if(r||"string"!=typeof t||n.getLogger(this).error("#container",`element with id '${t}' not found`),s===r)return;if(this._stopMeasuring(),this.removeHandles("container"),s&&(s.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this._attribution=o(this._attribution),this.root&&(g(this.root),this._set("root",null)),this.userContent&&(i(this.userContent,s),g(this.userContent),this._set("userContent",null))),!r)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);r.classList.add("esri-view");const d=document.createElement("div");d.className="esri-view-user-storage",i(r,d),r.appendChild(d),this._set("userContent",d);const c=document.createElement("div");c.className="esri-view-root",r.insertBefore(c,r.firstChild),this._set("root",c);const p=document.createElement("div");p.className="esri-view-surface",p.setAttribute("role","application"),p.tabIndex=0,c.appendChild(p),this._set("surface",p);const _=new f;c.appendChild(_.surface),this._set("overlay",_),this.addHandles(h(()=>_.needsRender,t=>{t&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=u({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=a(this._overlayRenderTaskHandle)}),"container"),this.addHandles([h(()=>({visible:this.attributionVisible&&this.ready,items:this.attributionItems,mode:this.attributionMode}),({visible:t,items:e,mode:i})=>{t?(this._attribution||(this._attribution=new m({attributionItems:this.attributionItems,mode:this.attributionMode}),this._attribution.
|
|
2
|
+
import{__decorate as t}from"tslib";import{byId as e,reparent as i}from"../core/domUtils.js";import{on as s}from"../core/events.js";import{makeHandle as r}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as o,removeMaybe as a}from"../core/maybe.js";import{watch as h,initial as d,syncAndInitial as l}from"../core/reactiveUtils.js";import{addFrameTask as u}from"../core/scheduling.js";import{property as c,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as m}from"./Attribution.js";import f from"./overlay/ViewOverlay.js";const _=[0,0];function y(t){const e=(t.ownerDocument||window.document).defaultView,i=t.getBoundingClientRect();return _[0]=i.left+(e?.pageXOffset??0),_[1]=i.top+(e?.pageYOffset??0),_}function g(t){t&&(t.textContent="",t.parentNode&&t.parentNode.removeChild(t))}const v="test"===process.env.NODE_ENV,b=v?0:16,w=v?0:750,C=v?0:512,H=2,O=_=>{const v=_;let O=class extends v{constructor(...t){super(...t),this._freqInfo={freq:b,time:w},this._overlayRenderTaskHandle=null,this.aria={},this.attributionMode=null,this.height=0,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([h(()=>this.cursor,t=>{const{surface:e}=this;e&&e.setAttribute("data-cursor",t)}),h(()=>this.navigating,t=>{const{surface:e}=this;e&&e.setAttribute("data-navigating",t.toString())}),h(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0})])}initialize(){const t=this;this.addHandles([h(()=>this.ui,(t,e)=>this._handleUIChange(t,e),d),t.on("focus",()=>this.notifyChange("focused")),t.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get("container")??null}set container(t){const s=this._get("container"),r=e(t);if(r||"string"!=typeof t||n.getLogger(this).error("#container",`element with id '${t}' not found`),s===r)return;if(this._stopMeasuring(),this.removeHandles("container"),s&&(s.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this._attribution=o(this._attribution),this.root&&(g(this.root),this._set("root",null)),this.userContent&&(i(this.userContent,s),g(this.userContent),this._set("userContent",null))),!r)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);r.classList.add("esri-view");const d=document.createElement("div");d.className="esri-view-user-storage",i(r,d),r.appendChild(d),this._set("userContent",d);const c=document.createElement("div");c.className="esri-view-root",r.insertBefore(c,r.firstChild),this._set("root",c);const p=document.createElement("div");p.className="esri-view-surface",p.setAttribute("role","application"),p.tabIndex=0,c.appendChild(p),this._set("surface",p);const _=new f;c.appendChild(_.surface),this._set("overlay",_),this.addHandles(h(()=>_.needsRender,t=>{t&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=u({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=a(this._overlayRenderTaskHandle)}),"container"),this.addHandles([h(()=>({visible:this.attributionVisible&&this.ready,items:this.attributionItems,mode:this.attributionMode}),({visible:t,items:e,mode:i})=>{t?(this._attribution||(this._attribution=new m({attributionItems:this.attributionItems,mode:this.attributionMode}),this._attribution.appendBefore(c,this.ui.container)),this._attribution.attributionItems=e,this._attribution.mode=i):this._attribution=o(this._attribution)},l)],"container"),this.forceDOMReadyCycle(),this._set("container",r),this._startMeasuring()}get focused(){const t=document.activeElement===this.surface;return document.hasFocus()&&t}get size(){return[this.width,this.height]}get ui(){return this._get("ui")}set ui(t){const e=this._get("ui");e!==t&&e?.destroy(),this._set("ui",t)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(t,e,i){const s=this.position;return t-=s?s[0]:0,e-=s?s[1]:0,i?(i[0]=t,i[1]=e):i=[t,e],i}containerToPage(t,e,i){const s=this.position;return t+=s?s[0]:0,e+=s?s[1]:0,i?(i[0]=t,i[1]=e):i=[t,e],i}_updateAria(){const{surface:t,aria:e}=this;t&&(t.ariaLabelledByElements=e?.labelledByElements??null,t.ariaDescribedByElements=e?.describedByElements??null,t.ariaLabel=e?.label??null,t.ariaDescription=e?.description??null)}_handleUIChange(t,e){this.removeHandles("ui"),e&&e!==t&&e.destroy(),t&&(t.view=this,this.addHandles(h(()=>this.root,e=>{if(e){const i=document.createElement("div");e.insertBefore(i,this._attribution?.surface??null),t.container=i}else t.container=null},d),"ui")),this._set("ui",t)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const t=this._freqInfo;t.freq=b,t.time=w;const e=u({prepare:t=>{const i=this._measure(),s=this._freqInfo;if(s.time+=t.deltaTime,i&&(s.freq=b,this._get("resizing")||this._set("resizing",!0)),s.time<s.freq)return;s.time=0;const r=this._position();s.freq=r||i?b:Math.min(w,s.freq*H),!i&&s.freq>=C&&(e.pause(),this._get("resizing")&&this._set("resizing",!1))}}),i=new ResizeObserver(i=>{t.freq=b,t.time=w,e.resume()});null!=this.container&&i.observe(this.container);const n=r(()=>i.disconnect());this.addHandles([s(window,"resize",()=>{t.freq=b,t.time=w,e.resume()}),n,e],"measuring"),this._measure(),this._position()}_measure(){const t=this.container,e=t?t.clientWidth:0,i=t?t.clientHeight:0;if(0===e||0===i)return this.suspended||this._set("suspended",!0),!1;const s=this.width,r=this.height;if(e===s&&i===r)return this.suspended&&this._set("suspended",!1),!1;this._set("width",e),this._set("height",i),this.suspended&&this._set("suspended",!1);return this.emit("resize",{oldWidth:s,oldHeight:r,width:e,height:i}),!0}_position(){const t=this.container,e=this.position,i=t&&y(t);return!!i&&((!e||i[0]!==e[0]||i[1]!==e[1])&&(this._set("position",[i[0],i[1]]),!0))}forceDOMReadyCycle(){}};return t([c()],O.prototype,"_attribution",void 0),t([c()],O.prototype,"aria",void 0),t([c()],O.prototype,"attributionHeight",null),t([c()],O.prototype,"attributionMode",void 0),t([c()],O.prototype,"container",null),t([c({readOnly:!0})],O.prototype,"focused",null),t([c({readOnly:!0})],O.prototype,"height",void 0),t([c()],O.prototype,"messagesCommon",void 0),t([c({type:f})],O.prototype,"overlay",void 0),t([c({readOnly:!0})],O.prototype,"position",void 0),t([c({readOnly:!0})],O.prototype,"resizing",void 0),t([c({readOnly:!0})],O.prototype,"root",void 0),t([c({value:null,readOnly:!0})],O.prototype,"size",null),t([c({readOnly:!0})],O.prototype,"surface",void 0),t([c({readOnly:!0})],O.prototype,"suspended",void 0),t([c({nonNullable:!0})],O.prototype,"ui",null),t([c({readOnly:!0})],O.prototype,"userContent",void 0),t([c({readOnly:!0})],O.prototype,"width",void 0),t([c()],O.prototype,"widthBreakpoint",void 0),O=t([p("esri.views.DOMContainer")],O),O};export{O as DOMContainer};
|
package/views/LinkChartView.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export default class LinkChartView extends View2D {
|
|
|
91
91
|
* @param screenPoint - The screen coordinates (or native mouse event) of the click on the view.
|
|
92
92
|
* @param options - Options to specify what is included in or excluded from the hitTest. Supported since 4.16.
|
|
93
93
|
* @returns When resolved, returns an array of objects containing different [result types](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ViewHit).
|
|
94
|
-
* @see [Sample: Access features with
|
|
94
|
+
* @see [Sample: Access features with hitTest](https://developers.arcgis.com/javascript/latest/sample-code/map-component-hittest/)
|
|
95
95
|
*/
|
|
96
96
|
hitTest(screenPoint: ScreenPoint | MouseEvent, options?: HitTestOptions): Promise<ViewHitTestResult>;
|
|
97
97
|
}
|
package/views/MapView.d.ts
CHANGED
|
@@ -370,7 +370,7 @@ export default class MapView extends View2D {
|
|
|
370
370
|
* @param screenPoint - The screen coordinates (or native mouse event) of the click on the view.
|
|
371
371
|
* @param options - Options to specify what is included in or excluded from the hitTest. Supported since 4.16.
|
|
372
372
|
* @returns When resolved, returns an array of objects containing different [result types](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ViewHit).
|
|
373
|
-
* @see [Sample: Access features with
|
|
373
|
+
* @see [Sample: Access features with hitTest](https://developers.arcgis.com/javascript/latest/sample-code/map-component-hittest/)
|
|
374
374
|
* @example
|
|
375
375
|
* // Get the screen point from the view's click event
|
|
376
376
|
* view.on("click", (event) => {
|
package/views/SceneView.d.ts
CHANGED
|
@@ -1398,7 +1398,7 @@ export default class SceneView extends SceneViewSuperclass {
|
|
|
1398
1398
|
* @param options - Intersection test options. By default the [Map.ground](https://developers.arcgis.com/javascript/latest/references/core/Map/#ground) is excluded if its opacity
|
|
1399
1399
|
* is smaller than one.
|
|
1400
1400
|
* @returns When resolved, returns an array of objects containing different [result types](https://developers.arcgis.com/javascript/latest/references/core/views/types/#SceneViewHit).
|
|
1401
|
-
* @see [Sample: Access features with
|
|
1401
|
+
* @see [Sample: Access features with hitTest](https://developers.arcgis.com/javascript/latest/sample-code/map-component-hittest/)
|
|
1402
1402
|
* @see [Sample: SceneView - hitTest](https://developers.arcgis.com/javascript/latest/sample-code/sceneview-hittest/)
|
|
1403
1403
|
* @example
|
|
1404
1404
|
* // Get the screen point from the view's click event
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import type Graphic from "../Graphic.js";
|
|
2
|
+
import type Collection from "../core/Collection.js";
|
|
3
|
+
import type GraphicsLayer from "../layers/GraphicsLayer.js";
|
|
4
|
+
import type View from "./View.js";
|
|
5
|
+
import type { EventedAccessor } from "../core/Evented.js";
|
|
6
|
+
import type { QueryProperties } from "../rest/support/Query.js";
|
|
7
|
+
import type { ObjectId } from "./types.js";
|
|
8
|
+
import type { LayerFeatureSet, LayerSelectionChange, SelectableLayer, SelectableLayerWithObjectIds, SelectionIdentifier, LayerSelection } from "./selection/types.js";
|
|
9
|
+
|
|
10
|
+
export interface SelectionManagerProperties extends Partial<Pick<SelectionManager, "highlightEnabled" | "highlightName" | "view">> {
|
|
11
|
+
/**
|
|
12
|
+
* A collection of selectable layers managed by the selection manager. Use `syncSources` to automatically populate this collection from the layers and tables in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
13
|
+
*
|
|
14
|
+
* > [!CAUTION]
|
|
15
|
+
* > When setting the sources property to an external Collection or array, the selection
|
|
16
|
+
* > manager adds its contents to an internal Collection.
|
|
17
|
+
* > Therefore, when the `SelectionManager` is destroyed, this internal `sources`
|
|
18
|
+
* > Collection is always destroyed.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Create a selection manager and set its view.
|
|
22
|
+
* // Then, add a layer to its sources.
|
|
23
|
+
* const selectionManager = new SelectionManager({
|
|
24
|
+
* view,
|
|
25
|
+
* sources: [featureLayer]
|
|
26
|
+
* });
|
|
27
|
+
* @example
|
|
28
|
+
* // Later, if you want to add more layers, you can do so like this:
|
|
29
|
+
* selectionManager.sources.add(anotherFeatureLayer);
|
|
30
|
+
* // Or, if you want to replace the existing sources with a new set of layers:
|
|
31
|
+
* selectionManager.sources = [differentFeatureLayer];
|
|
32
|
+
* @see [syncSources](#syncSources)
|
|
33
|
+
*/
|
|
34
|
+
sources?: Collection<SelectableLayer> | SelectableLayer[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** @since 5.0 */
|
|
38
|
+
export interface SelectionManagerEvents {
|
|
39
|
+
/** @since 5.0 */
|
|
40
|
+
"selection-change": {
|
|
41
|
+
view: View | null | undefined;
|
|
42
|
+
changes: LayerSelectionChange[];
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A selection manager controls the selection of features in layers and tables within a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) to help manage feature selection. It can be wired up to listen for edits made to selectable layers and have the selection update accordingly.
|
|
48
|
+
*
|
|
49
|
+
* @since 5.0
|
|
50
|
+
* @beta
|
|
51
|
+
* @example
|
|
52
|
+
* // Create a selection manager and set its view.
|
|
53
|
+
* // Then, add a layer to its sources.
|
|
54
|
+
* const selectionManager = new SelectionManager({
|
|
55
|
+
* view,
|
|
56
|
+
* sources: [featureLayer]
|
|
57
|
+
* });
|
|
58
|
+
* // Select the features in the layer with specified Object IDs.
|
|
59
|
+
* selectionManager.replace(featureLayer, [1, 2, 3]);
|
|
60
|
+
*/
|
|
61
|
+
export default class SelectionManager extends EventedAccessor {
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated
|
|
64
|
+
* Do not directly reference this property.
|
|
65
|
+
* Use EventNames and EventTypes helpers from \@arcgis/core/Evented
|
|
66
|
+
*/
|
|
67
|
+
"@eventTypes": SelectionManagerEvents;
|
|
68
|
+
constructor(properties?: SelectionManagerProperties);
|
|
69
|
+
/** The total number of selected features across all sources. */
|
|
70
|
+
get count(): number;
|
|
71
|
+
/** Returns `true` if at least one source has an active selection. */
|
|
72
|
+
get hasSelection(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Indicates whether to display a visual representation of the selection with a highlight.
|
|
75
|
+
*
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
accessor highlightEnabled: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The [highlights name](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/#name) to use when specifying a set of [highlight options](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/).
|
|
81
|
+
*
|
|
82
|
+
* @default "default"
|
|
83
|
+
* @see [MapView.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#highlights)
|
|
84
|
+
* @see [HighlightOptions](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/)
|
|
85
|
+
*/
|
|
86
|
+
accessor highlightName: string;
|
|
87
|
+
/** A read-only copy of the selection. To modify selections, use [add](#add), [replace](#replace), [remove](#remove), or [toggle](#toggle). */
|
|
88
|
+
get selections(): LayerSelection[];
|
|
89
|
+
/**
|
|
90
|
+
* A collection of selectable layers managed by the selection manager. Use `syncSources` to automatically populate this collection from the layers and tables in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
91
|
+
*
|
|
92
|
+
* > [!CAUTION]
|
|
93
|
+
* > When setting the sources property to an external Collection or array, the selection
|
|
94
|
+
* > manager adds its contents to an internal Collection.
|
|
95
|
+
* > Therefore, when the `SelectionManager` is destroyed, this internal `sources`
|
|
96
|
+
* > Collection is always destroyed.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* // Create a selection manager and set its view.
|
|
100
|
+
* // Then, add a layer to its sources.
|
|
101
|
+
* const selectionManager = new SelectionManager({
|
|
102
|
+
* view,
|
|
103
|
+
* sources: [featureLayer]
|
|
104
|
+
* });
|
|
105
|
+
* @example
|
|
106
|
+
* // Later, if you want to add more layers, you can do so like this:
|
|
107
|
+
* selectionManager.sources.add(anotherFeatureLayer);
|
|
108
|
+
* // Or, if you want to replace the existing sources with a new set of layers:
|
|
109
|
+
* selectionManager.sources = [differentFeatureLayer];
|
|
110
|
+
* @see [syncSources](#syncSources)
|
|
111
|
+
*/
|
|
112
|
+
get sources(): Collection<SelectableLayer>;
|
|
113
|
+
set sources(value: Collection<SelectableLayer> | SelectableLayer[]);
|
|
114
|
+
/**
|
|
115
|
+
* Indicates whether the selection manager is currently updating the view's visualization of selections.
|
|
116
|
+
*
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
get updating(): boolean;
|
|
120
|
+
/** A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/), or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). This property must be set if wanting to highlight a corresponding feature within the map when a row is selected. In addition, setting the `view` is required if working with [layer views](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/). */
|
|
121
|
+
accessor view: View | null | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Adds features to the current selection. It does not replace the existing selection.
|
|
124
|
+
*
|
|
125
|
+
* @param layer - The selectable layer to which to add the selection. This must be a layer with graphics in the [sources](#sources).
|
|
126
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) to add to the current selection.
|
|
127
|
+
*/
|
|
128
|
+
add(layer: GraphicsLayer, selection: Graphic[]): void;
|
|
129
|
+
/**
|
|
130
|
+
* Adds features to the current selection. It does not replace the existing selection.
|
|
131
|
+
*
|
|
132
|
+
* @param layer - The selectable layer to which to add the selection. This must be a layer with object IDs in the [sources](#sources).
|
|
133
|
+
* @param selection - An array of features, ie. [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to add to the current selection.
|
|
134
|
+
*/
|
|
135
|
+
add(layer: SelectableLayerWithObjectIds, selection: ObjectId[]): void;
|
|
136
|
+
/**
|
|
137
|
+
* Adds features to the current selection. It does not replace the existing selection.
|
|
138
|
+
*
|
|
139
|
+
* @param layer - The selectable layer to which to add the selection. This must be a layer in the [sources](#sources). It can be a layer with graphics or object IDs.
|
|
140
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) or [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to add to the current selection.
|
|
141
|
+
*/
|
|
142
|
+
add(layer: SelectableLayer, selection: SelectionIdentifier[]): void;
|
|
143
|
+
/** Clears all selections from all layers. */
|
|
144
|
+
clear(): void;
|
|
145
|
+
/**
|
|
146
|
+
* Queries the selected features for one or more layers. It uses the
|
|
147
|
+
* current selection identifiers to fetch feature data from
|
|
148
|
+
* the layer which may include attributes, geometry, etc. depending on the layer's capabilities and the supplied `queryParams`.
|
|
149
|
+
*
|
|
150
|
+
* @param includeLayers - Specifies the layer from which to fetch features. If not provided, all layers with active selections are queried.
|
|
151
|
+
* @param queryParams - If supplied, it may include any supplemental parameters to thin out the feature results. The object IDs will also be part of the generated query.
|
|
152
|
+
* @param queryTarget - If `"layer"`, applies all queries to the layer itself rather than the layer view. This can be used to bypass any client-side filtering that may be applied within the layer view. Note that not all layers support querying on the layer itself, so this option should be used with caution. If a layer does not support querying on the layer itself, the query will automatically be applied to the layer view instead.
|
|
153
|
+
* @returns A promise that resolves to an array of [LayerFeatureSet](https://developers.arcgis.com/javascript/latest/references/core/views/selection/types/#LayerFeatureSet), which includes the layer and the resulting features for that layer.
|
|
154
|
+
* @name getSelectedFeatures
|
|
155
|
+
*/
|
|
156
|
+
getSelectedFeatures(includeLayers: SelectableLayerWithObjectIds[] | undefined, queryParams: QueryProperties | undefined, queryTarget?: "layerView" | "layer"): Promise<LayerFeatureSet[]>;
|
|
157
|
+
/**
|
|
158
|
+
* Gets the active selection for the provided layer. If the layer is not part of the [sources](#sources) or has no active selection, this method returns `undefined`. Otherwise, it returns an array of selected features, which can be either [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) or [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] depending on the layer's capabilities. To retrieve the full graphic representations of selected features from a layer that supports only object ID selection, use the [getSelectedFeatures](#getSelectedFeatures) method. This method queries the layer using the selected object IDs and returns the corresponding feature graphics.
|
|
159
|
+
*
|
|
160
|
+
* @param target - The selectable layer that provides the selected features. This must be a layer with graphics in the [sources](#sources).
|
|
161
|
+
* @returns Returns an array of [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/)s representing the selected features.
|
|
162
|
+
*/
|
|
163
|
+
getSelection(target: GraphicsLayer): Graphic[] | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* @param target - The selectable layer that provides the selected features. This must be a layer with object IDs in the [sources](#sources).
|
|
166
|
+
* @returns Returns an array of [ObjectId's](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId) representing the selected features.
|
|
167
|
+
*/
|
|
168
|
+
getSelection(target: SelectableLayerWithObjectIds): ObjectId[] | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* @param target - The selectable layer that provides the selected features.This must be a layer in the [sources](#sources). It can be a layer with graphics or object IDs.
|
|
171
|
+
* @returns Returns an array of selected features represented as either [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) or [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] dependent upon the layer's capabilities.
|
|
172
|
+
*/
|
|
173
|
+
getSelection(target: SelectableLayer): SelectionIdentifier[] | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Removes the provided features from the current selection for the provided layer.
|
|
176
|
+
*
|
|
177
|
+
* @param target - The selectable layer from which to remove the selection. This must be a layer with graphics in the [sources](#sources).
|
|
178
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) to remove from the current selection.
|
|
179
|
+
*/
|
|
180
|
+
remove(target: GraphicsLayer, selection: Graphic[]): void;
|
|
181
|
+
/**
|
|
182
|
+
* @param target - The selectable layer from which to remove the selection. This must be a layer with object IDs in the [sources](#sources).
|
|
183
|
+
* @param selection - An array of features, ie. [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to remove from the current selection.
|
|
184
|
+
*/
|
|
185
|
+
remove(target: SelectableLayerWithObjectIds, selection: ObjectId[]): void;
|
|
186
|
+
/**
|
|
187
|
+
* @param target - The selectable layer from which to remove the selection. This must be a layer in the [sources](#sources). It can be a layer with graphics or object IDs.
|
|
188
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) or [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to remove from the current selection.
|
|
189
|
+
*/
|
|
190
|
+
remove(target: SelectableLayer, selection: SelectionIdentifier[]): void;
|
|
191
|
+
/**
|
|
192
|
+
* Replaces the current selection for the provided layer with the provided features.
|
|
193
|
+
*
|
|
194
|
+
* @param layer - The selectable layer for which to replace the selection. This must be a layer with graphics in the [sources](#sources).
|
|
195
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) to set as the current selection.
|
|
196
|
+
*/
|
|
197
|
+
replace(layer: GraphicsLayer, selection: Graphic[]): void;
|
|
198
|
+
/**
|
|
199
|
+
* @param layer - The selectable layer for which to replace the selection. This must be a layer with object IDs in the [sources](#sources).
|
|
200
|
+
* @param selection - An array of features, ie. [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to set as the current selection.
|
|
201
|
+
*/
|
|
202
|
+
replace(layer: SelectableLayerWithObjectIds, selection: ObjectId[]): void;
|
|
203
|
+
/**
|
|
204
|
+
* @param layer - The selectable layer for which to replace the selection. This must be a layer in the [sources](#sources). It can be a layer with graphics or object IDs.
|
|
205
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) or [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to set as the current selection.
|
|
206
|
+
*/
|
|
207
|
+
replace(layer: SelectableLayer, selection: SelectionIdentifier[]): void;
|
|
208
|
+
/**
|
|
209
|
+
* A convenience method to synchronize the [sources](#sources) with the layers and tables in the provided view. This is useful when layers or tables have been added or removed from the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). This method is not applicable if [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) is not provided with the view.
|
|
210
|
+
*
|
|
211
|
+
* @see [sources](#sources)
|
|
212
|
+
* @example
|
|
213
|
+
* // Add a layer to the view's map after the selection manager has already been created
|
|
214
|
+
* // and synced with the existing layers.
|
|
215
|
+
* // Then, call syncSources to update the selection manager with the new layer.
|
|
216
|
+
* const selectionManager = new SelectionManager({
|
|
217
|
+
* view: someView
|
|
218
|
+
* });
|
|
219
|
+
* someView.map.add(featureLayer);
|
|
220
|
+
* selectionManager.syncSources();
|
|
221
|
+
*/
|
|
222
|
+
syncSources(): void;
|
|
223
|
+
/**
|
|
224
|
+
* Toggles selection for the provided features within the provided layer's selection set.
|
|
225
|
+
* If a given feature is part of the current set it will be removed, otherwise it will be added.
|
|
226
|
+
* This method is designed to make it easy to toggle features in/out of the selected set in response to a query or UI event.
|
|
227
|
+
*
|
|
228
|
+
* @param layer - The selectable layer for which to toggle the selection. This must be a layer with graphics in the [sources](#sources).
|
|
229
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) to toggle within the current selection.
|
|
230
|
+
*/
|
|
231
|
+
toggle(layer: GraphicsLayer, selection: Graphic[]): void;
|
|
232
|
+
/**
|
|
233
|
+
* @param layer - The selectable layer for which to toggle the selection. This must be a layer with object IDs in the [sources](#sources).
|
|
234
|
+
* @param selection - An array of features, ie. [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to toggle within the current selection.
|
|
235
|
+
*/
|
|
236
|
+
toggle(layer: SelectableLayerWithObjectIds, selection: ObjectId[]): void;
|
|
237
|
+
/**
|
|
238
|
+
* @param layer - The selectable layer for which to toggle the selection. This must be a layer in the [sources](#sources). It can be a layer with graphics or object IDs.
|
|
239
|
+
* @param selection - An array of features, ie. [Graphic[]](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) or [ObjectId](https://developers.arcgis.com/javascript/latest/references/core/views/types/#ObjectId)[] to toggle within the current selection.
|
|
240
|
+
*/
|
|
241
|
+
toggle(layer: SelectableLayer, selection: SelectionIdentifier[]): void;
|
|
242
|
+
}
|
package/views/View.d.ts
CHANGED
|
@@ -331,7 +331,7 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
|
|
|
331
331
|
* >
|
|
332
332
|
* > 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.
|
|
333
333
|
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
334
|
-
* > For information
|
|
334
|
+
* > For information, see the [Terms of Use documentation](https://developers.arcgis.com/documentation/terms-of-use/).
|
|
335
335
|
*
|
|
336
336
|
* @default true
|
|
337
337
|
* @since 5.0
|
package/views/input/types.d.ts
CHANGED
|
@@ -883,7 +883,7 @@ export interface ViewEventTypes extends ViewBaseEventTypes {
|
|
|
883
883
|
* for responding to a click event without delay.
|
|
884
884
|
*
|
|
885
885
|
* @since 5.0
|
|
886
|
-
* @see [Sample: Access features with
|
|
886
|
+
* @see [Sample: Access features with hitTest](https://developers.arcgis.com/javascript/latest/sample-code/map-component-hittest/)
|
|
887
887
|
* @example
|
|
888
888
|
* view.on("click", function(event){
|
|
889
889
|
* // event is the event object returned after the event fires
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{remove as e}from"../../core/arrayUtils.js";import{makeHandle as t,handlesGroup as
|
|
2
|
+
import{remove as e}from"../../core/arrayUtils.js";import{makeHandle as t,handlesGroup as o}from"../../core/handleUtils.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{ViewEventPriorities as r}from"../input/InputManager.js";import{primaryKey as n}from"../input/keys.js";const s="z",a="r",p={cancel:"Escape",complete:"Enter"},c={...p,redo:a,undo:s,center:"Alt",constraint:"Shift",delete:["Backspace","Delete"],vertexAdd:"f",pan:" "},f={toggle:"Control"},d={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},h={moveUp:{key:"ArrowUp",modifier:"Shift",repeats:!0},moveDown:{key:"ArrowDown",modifier:"Shift",repeats:!0},moveLeft:{key:"ArrowLeft",modifier:"Shift",repeats:!0},moveRight:{key:"ArrowRight",modifier:"Shift",repeats:!0},scaleUp:{key:"+",modifier:"Shift"},scaleDown:{key:"-",modifier:"Shift"},factorModifier:{key:n,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},editSourcePoints:{key:"Alt",continuePropagation:!0},undo:s,redo:a},g={toggleFollowManipulator:{key:"v",repeats:!1,continuePropagation:!0}},m={invertType:["Control","Meta"]};class y{constructor(){this._bindings=new Map}add(e,t){return this.addToggle(e,e=>{"key-down"===e.type&&t(e)})}addToggle(o,r){const n=l.fromDefinition(o,r),s=i(this._bindings,n.key,()=>[]);return s.push(n),t(()=>e(s,n))}register(e,t=r.WIDGET){return o([e.on("key-down",t=>this.dispatch(e.inputManager,t),t),e.on("key-up",t=>this.dispatch(e.inputManager,t),t)])}dispatch(e,t){const o=t.key,i=this._bindings.get(o);if(i)for(const r of i)r.process(e,t)}}class l{constructor(e,t,o,i,r){this.key=e,this.modifiers=t,this.repeats=o,this.continuePropagation=i,this.callback=r}process(e,t){if(!(t.key!==this.key||"repeat"in t&&t.repeat&&!this.repeats)){for(const t of this.modifiers)if(!e.isModifierKeyDown(t))return;this.continuePropagation||t.stopPropagation(),this.callback(t)}}static fromDefinition(e,t){if("string"==typeof e)return new l(e,[],!1,!1,t);const{key:o,modifier:i,repeats:r,continuePropagation:n}=e;return new l(o,i?Array.isArray(i)?i:[i]:[],!!r,!!n,t)}}export{y as KeyBindings,g as advancedSketchKeys,p as interactiveToolKeys,h as mediaKeys,m as selectionKeys,c as sketchKeys,f as snappingKeys,d as tooltipKeys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{LineConstraint as t}from"../../sketch/constraints.js";import{FeatureSnappingCandidate as n}from"./FeatureSnappingCandidate.js";import{LineSnappingHint as s}from"../hints/LineSnappingHint.js";class
|
|
2
|
+
import{LineConstraint as t}from"../../sketch/constraints.js";import{FeatureSnappingCandidate as n}from"./FeatureSnappingCandidate.js";import{LineSnappingHint as s}from"../hints/LineSnappingHint.js";class r extends n{constructor(n){super({...n,constraint:new t(n.edgeStart,n.edgeEnd)}),this.curve=n.curve}get hints(){return[new s(1,this.constraint.start,this.constraint.end,this.isDraped,this.domain,!0,!0,this.curve)]}}export{r as EdgeSnappingCandidate};
|