@arcgis/core 5.2.0-next.121 → 5.2.0-next.123

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.
Files changed (228) hide show
  1. package/Ground.js +1 -1
  2. package/arcgisGlobal.d.ts +2 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +1 -0
  5. package/assets/esri/core/workers/chunks/{deb5b1d772ca407654d4.js → 0acc754907395e83bbc6.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{bcb06a0643b4c83535ee.js → 1302bf9718747cd9fdd9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{956432c9d45940983bc2.js → 1b42d163ef22e3565bb7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4adad3312caa24af98ac.js → 1c38ce72160d5a4e4b3d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1c3b087fbf2d102376fc.js +1 -0
  11. package/assets/esri/core/workers/chunks/{9b3813e39992b1b99941.js → 1e46703cb566c25458ad.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{015cb790262a59857c5f.js → 1f135269aea3931e11b2.js} +1 -1
  13. package/assets/esri/core/workers/chunks/23279303cd7698314c56.js +1 -0
  14. package/assets/esri/core/workers/chunks/{4bf2cc4d092601ff2b86.js → 24673aac70d6c949b6fa.js} +1 -1
  15. package/assets/esri/core/workers/chunks/24cf91aeab53a897e951.js +1 -0
  16. package/assets/esri/core/workers/chunks/26bc509a031788bfa678.js +1 -0
  17. package/assets/esri/core/workers/chunks/2ae6deade655fdbc28de.js +1 -0
  18. package/assets/esri/core/workers/chunks/{37cf4ca2083cd3b6002e.js → 2c7bb5c9751524687002.js} +1 -1
  19. package/assets/esri/core/workers/chunks/2c8957f9c7610805208c.js +1 -0
  20. package/assets/esri/core/workers/chunks/{a3c1a5a5c5cbf27b376d.js → 2d592c935571de80a2e2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{a917a1df8270860dc514.js → 2f52ad525744b8793d49.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{6efc5873747b9cd44fb9.js → 323451ef52d0c2805f1d.js} +1 -1
  23. package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
  24. package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +1 -0
  25. package/assets/esri/core/workers/chunks/3e33d953e41b281a120b.js +1 -0
  26. package/assets/esri/core/workers/chunks/3e52351e06d85bf9bedd.js +1 -0
  27. package/assets/esri/core/workers/chunks/{fbc5f275c4e5e6bfffaa.js → 462fd57af8ed7921d6ba.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{1846296be959e28c42bb.js → 475906b079f4f1ddacf2.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{ea49721fdd2172d1c799.js → 48a2f68e06a2e90b77d0.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{b6ca73c1384f07b30b74.js → 4bb8432d99a39733368f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{c44cbe04efddbbbaec13.js → 4f58e0322707f63f5bf2.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{0e9f54d7f158195bd203.js → 59cd139712d919e6a738.js} +1 -1
  33. package/assets/esri/core/workers/chunks/59d5247ac4075b024244.js +1 -0
  34. package/assets/esri/core/workers/chunks/5afc12671a9a1bb6c56c.js +1 -0
  35. package/assets/esri/core/workers/chunks/5b9f3c4f65412c66316f.js +1 -0
  36. package/assets/esri/core/workers/chunks/{be3421ffb5b391bca02e.js → 5d35e0c2665f5e625ee9.js} +1 -1
  37. package/assets/esri/core/workers/chunks/5e70bfb9d6235a87b87a.js +1 -0
  38. package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +1 -0
  39. package/assets/esri/core/workers/chunks/618927cfcb93dd1d92fd.js +1 -0
  40. package/assets/esri/core/workers/chunks/6709d24867d275b33d24.js +1 -0
  41. package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +1 -0
  42. package/assets/esri/core/workers/chunks/{fd5e61cb6f936eadcfe3.js → 724ea2e2843e6dac0a90.js} +1 -1
  43. package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{e86f83a6514a35255f64.js → 781fa83e8063b8f685dc.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{a005efcde3ca9def4e6b.js → 78c1b75b1a8937eaa3cd.js} +1 -1
  46. package/assets/esri/core/workers/chunks/793b072519ded0dc6f34.js +1 -0
  47. package/assets/esri/core/workers/chunks/{1086f190f94c715bbfe4.js → 7994fce5f36963aadc51.js} +1 -1
  48. package/assets/esri/core/workers/chunks/7adee504107cb9ad8563.js +1 -0
  49. package/assets/esri/core/workers/chunks/7efc45858ebd3fd3302e.js +1 -0
  50. package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +1 -0
  51. package/assets/esri/core/workers/chunks/813dd84933b407c8fe86.js +1 -0
  52. package/assets/esri/core/workers/chunks/8daeac785af725c3ebdf.js +1 -0
  53. package/assets/esri/core/workers/chunks/{3ab25279aaa30f035038.js → 8daed13400d9e63e65ae.js} +1 -1
  54. package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +1 -0
  55. package/assets/esri/core/workers/chunks/{cf7c06702babd6fa88b4.js → 9af36ee6a0df224859bc.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{452d069ba7ad6759b558.js → 9c46c7f00d42f5c02b26.js} +1 -1
  57. package/assets/esri/core/workers/chunks/a3ab53b534e2872131be.js +1 -0
  58. package/assets/esri/core/workers/chunks/{fa3f824c874f29d24953.js → aa6b2cc8f6f5627891c1.js} +1 -1
  59. package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +1 -0
  60. package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +1 -0
  61. package/assets/esri/core/workers/chunks/{60c61f34733063730386.js → b013b70e40dfb6ce013e.js} +1 -1
  62. package/assets/esri/core/workers/chunks/b22de8bf4a4a739bc36d.js +1 -0
  63. package/assets/esri/core/workers/chunks/b39cd78d2d97bef9909e.js +1 -0
  64. package/assets/esri/core/workers/chunks/b5f50955c1eee55b67d1.js +1 -0
  65. package/assets/esri/core/workers/chunks/bdf012e591a8476db467.js +1 -0
  66. package/assets/esri/core/workers/chunks/{daf7b647bd960d8bad56.js → be52c319a0a81ce1ba36.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{89edaa1ffa566908ebca.js → ca5a4f62b09cc8579dc0.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{fbb390c0d92d1536fce3.js → ce1ccf9ec90b786591e5.js} +1 -1
  69. package/assets/esri/core/workers/chunks/cf0bed7ae27021fd7b05.js +1 -0
  70. package/assets/esri/core/workers/chunks/cf6f671823fa6c2a9a5e.js +1 -0
  71. package/assets/esri/core/workers/chunks/{39c5e0f6262f69a62c66.js → d25210574168ead2f813.js} +1 -1
  72. package/assets/esri/core/workers/chunks/d3378c479052d566317c.js +1 -0
  73. package/assets/esri/core/workers/chunks/d3ef23923424ad8c5048.js +1 -0
  74. package/assets/esri/core/workers/chunks/{46388b86d1b10e6121bd.js → d507d7d7a7282fc38e8d.js} +1 -1
  75. package/assets/esri/core/workers/chunks/dc0816f064be576a2fa6.js +1 -0
  76. package/assets/esri/core/workers/chunks/{d9b761104ab6e4acaf91.js → dd4ecf81250cc001d040.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{ab60f3bc18b5ea504f70.js → e0eb89a935509ba34d9b.js} +1 -1
  78. package/assets/esri/core/workers/chunks/e10fe4c77b8dc4492092.js +1 -0
  79. package/assets/esri/core/workers/chunks/e4e1db4e9e5f13167401.js +1 -0
  80. package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +1 -0
  81. package/assets/esri/core/workers/chunks/{e755075ac2e02e881fad.js → e6637f9176566382ed3e.js} +1 -1
  82. package/assets/esri/core/workers/chunks/e6dc68c4bd8eddb168d1.js +1 -0
  83. package/assets/esri/core/workers/chunks/eb780f2dafa14f776166.js +1 -0
  84. package/assets/esri/core/workers/chunks/{d9d5f50af047ee7af129.js → eb7f45736c852725b0bb.js} +89 -58
  85. package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +1 -0
  86. package/assets/esri/core/workers/chunks/f38d11be766043413659.js +1 -0
  87. package/assets/esri/libs/pdfjs/pdf.worker.mjs +63075 -0
  88. package/assets/esri/libs/pdfjs/wasm/jbig2.wasm +0 -0
  89. package/assets/esri/libs/pdfjs/wasm/openjpeg.wasm +0 -0
  90. package/assets/esri/libs/pdfjs/wasm/qcms_bg.wasm +0 -0
  91. package/assets/esri/libs/pdfjs/wasm/quickjs-eval.wasm +0 -0
  92. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.en.json +1 -1
  93. package/chunks/CloudsComposition.glsl.js +2 -2
  94. package/chunks/GlobalIllumination.glsl.js +42 -13
  95. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  96. package/config.js +1 -1
  97. package/core/arrayUtils.js +1 -1
  98. package/core/workers/registry.js +1 -1
  99. package/geometry/support/geometryUtils.js +1 -1
  100. package/geometry/support/heightModelInfoUtils.js +1 -1
  101. package/geometry/support/meshUtils/elevation.js +1 -1
  102. package/kernel.js +1 -1
  103. package/layers/GeospatialPDFLayer.d.ts +40 -0
  104. package/layers/GeospatialPDFLayer.js +2 -0
  105. package/layers/IntegratedMeshLayer.js +1 -1
  106. package/layers/geospatialPDF/GeospatialPDFFrame.js +2 -0
  107. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +5 -0
  108. package/layers/geospatialPDF/GeospatialPDFParserUtils.js +2 -0
  109. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +2 -0
  110. package/layers/geospatialPDF/LGIDictMapFrame.js +2 -0
  111. package/layers/geospatialPDF/Projection.js +2 -0
  112. package/layers/geospatialPDF/ViewportMeasureFrame.js +2 -0
  113. package/layers/geospatialPDF/renderExtentUtils.js +2 -0
  114. package/layers/geospatialPDF/sharedUtils.js +2 -0
  115. package/layers/mixins/ArcGISImageService.js +1 -1
  116. package/layers/raster/datasets/GeospatialPDFRaster.js +2 -0
  117. package/layers/support/ElevationQuery.js +1 -1
  118. package/layers/support/LabelClass.js +1 -1
  119. package/layers/support/layersLoader.js +1 -1
  120. package/layers/types.d.ts +1 -1
  121. package/package.json +4 -4
  122. package/portal/PortalItem.js +1 -1
  123. package/portal/support/portalLayers.js +1 -1
  124. package/support/revision.js +1 -1
  125. package/symbols/cim/OverrideHelper.js +1 -1
  126. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  127. package/views/2d/input/MapViewInputManager.js +1 -1
  128. package/views/2d/input/handlers/KeyPan.js +1 -1
  129. package/views/2d/input/handlers/KeyRotate.js +1 -1
  130. package/views/2d/layerViewModuleImportUtils.js +1 -1
  131. package/views/2d/layers/GeospatialPDFLayerView2D.js +2 -0
  132. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  133. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  134. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  135. package/views/2d/types.d.ts +2 -0
  136. package/views/3d/GroundView3D.js +1 -1
  137. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  138. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  139. package/views/3d/layerViewModuleImportUtils.js +1 -1
  140. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  141. package/views/3d/layers/GeospatialPDFLayerView3D.js +2 -0
  142. package/views/3d/layers/I3SMeshView3D.js +1 -1
  143. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  144. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  145. package/views/3d/layers/LayerView3D.js +1 -1
  146. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  147. package/views/3d/layers/i3s/Intersector.js +1 -1
  148. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  149. package/views/3d/support/GroundAndIMSurface.js +1 -1
  150. package/views/3d/support/hitTest.js +1 -1
  151. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  152. package/views/3d/types.d.ts +2 -0
  153. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  154. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +8 -6
  155. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +2 -2
  156. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  157. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +6 -6
  158. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  159. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  160. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  161. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  162. package/views/SceneView.d.ts +31 -0
  163. package/views/SceneView.js +1 -1
  164. package/views/View.d.ts +35 -0
  165. package/views/View.js +1 -1
  166. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  167. package/views/analysis/ElevationProfile/elevationProfileQuerySourceUtils.js +1 -1
  168. package/views/interactive/options/ViewOptions.d.ts +98 -0
  169. package/views/interactive/options/ViewOptions.js +2 -0
  170. package/views/interactive/support/Units.d.ts +10 -2
  171. package/views/interactive/support/Units.js +1 -1
  172. package/views/layers/FeatureLikeLayerView.d.ts +27 -5
  173. package/views/layers/GraphicsLayerView.d.ts +25 -2
  174. package/views/layers/ImageryTileLayerView.js +1 -1
  175. package/views/selection/types.d.ts +1 -1
  176. package/views/support/DefaultsFromMap.js +1 -1
  177. package/views/types.d.ts +9 -3
  178. package/widgets/ElevationProfile/ElevationProfileLineGround.js +1 -1
  179. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +8 -2
  180. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  181. package/widgets/support/SelectionToolbar/VisibleElements.d.ts +8 -1
  182. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  183. package/widgets/support/SelectionToolbar.d.ts +7 -1
  184. package/widgets/support/SelectionToolbar.js +1 -1
  185. package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +0 -1
  186. package/assets/esri/core/workers/chunks/0b727d7bf3e36e146725.js +0 -1
  187. package/assets/esri/core/workers/chunks/0bd067a5c0bac96caeb5.js +0 -1
  188. package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +0 -1
  189. package/assets/esri/core/workers/chunks/114bc14c49176f64a2c5.js +0 -1
  190. package/assets/esri/core/workers/chunks/173417fe995e9bfc49d8.js +0 -1
  191. package/assets/esri/core/workers/chunks/2cf571d968118b6bdde0.js +0 -1
  192. package/assets/esri/core/workers/chunks/43436c7ccc6baefc885d.js +0 -1
  193. package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +0 -1
  194. package/assets/esri/core/workers/chunks/48d3da636be15581fd7d.js +0 -1
  195. package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +0 -1
  196. package/assets/esri/core/workers/chunks/50ae209237f104735a30.js +0 -1
  197. package/assets/esri/core/workers/chunks/54f9062526c2002b7fd7.js +0 -1
  198. package/assets/esri/core/workers/chunks/56b7ac280bf0be938c14.js +0 -1
  199. package/assets/esri/core/workers/chunks/61bcbafd676804ce3e1d.js +0 -1
  200. package/assets/esri/core/workers/chunks/63f7141c71f29dbe8270.js +0 -1
  201. package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +0 -1
  202. package/assets/esri/core/workers/chunks/75410a4de76e67ed5da4.js +0 -1
  203. package/assets/esri/core/workers/chunks/85780f4fa4b5509f864e.js +0 -1
  204. package/assets/esri/core/workers/chunks/862754d2d659528fe884.js +0 -1
  205. package/assets/esri/core/workers/chunks/8675ab3c4dec2f13b9c6.js +0 -1
  206. package/assets/esri/core/workers/chunks/8a103b6e9534516421e2.js +0 -1
  207. package/assets/esri/core/workers/chunks/917dec9c004218c58950.js +0 -1
  208. package/assets/esri/core/workers/chunks/91a51d959ee5c6123c46.js +0 -1
  209. package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +0 -1
  210. package/assets/esri/core/workers/chunks/99ebc99e8d1bca105b5e.js +0 -1
  211. package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +0 -1
  212. package/assets/esri/core/workers/chunks/a42505b978d54d36d3b6.js +0 -1
  213. package/assets/esri/core/workers/chunks/a70c59129ea808857d07.js +0 -1
  214. package/assets/esri/core/workers/chunks/a86a4e550a92f770d6d5.js +0 -1
  215. package/assets/esri/core/workers/chunks/b45ebb1b64ee7314375e.js +0 -1
  216. package/assets/esri/core/workers/chunks/b5b30c8447a0f967fa79.js +0 -1
  217. package/assets/esri/core/workers/chunks/baa8bce361a2677533ec.js +0 -1
  218. package/assets/esri/core/workers/chunks/c70a32ac0fa49f4493ca.js +0 -1
  219. package/assets/esri/core/workers/chunks/cf1106eda10f3cccb1bd.js +0 -1
  220. package/assets/esri/core/workers/chunks/d1b5be1aeab16d36d4b1.js +0 -1
  221. package/assets/esri/core/workers/chunks/d38252956c3d9e2168f7.js +0 -1
  222. package/assets/esri/core/workers/chunks/d6130cd8a20d24dd9d3c.js +0 -1
  223. package/assets/esri/core/workers/chunks/da161f8cbe1cfc5fcf7c.js +0 -1
  224. package/assets/esri/core/workers/chunks/da5b3421a984cb94fd58.js +0 -1
  225. package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +0 -1
  226. package/assets/esri/core/workers/chunks/e88eee4c2fc4229c2a8b.js +0 -1
  227. package/assets/esri/core/workers/chunks/f75e57d3e02f9828b049.js +0 -1
  228. package/assets/esri/core/workers/chunks/f774e5b94710ccee1af0.js +0 -1
package/views/View.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{referenceSetter as s}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as h}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import g from"../core/ReactiveSet.js";import{watch as f,sync as w,whenOnce as v,when as _,syncAndInitial as M}from"../core/reactiveUtils.js";import{property as V,subclass as b}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import T from"../geometry/Extent.js";import j from"../geometry/HeightModelInfo.js";import E from"../geometry/SpatialReference.js";import{equals as L}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as x}from"../support/AnalysesCollection.js";import{GraphicsCollection as C}from"../support/GraphicsCollection.js";import{system as F}from"../time/constants.js";import O from"../time/TimeExtent.js";import{isTimeZoneValid as k}from"../time/timeZoneUtils.js";import H from"./BasemapView.js";import I from"./Magnifier.js";import Z from"./SelectionManager.js";import q from"./Theme.js";import{ToolViewManager as W}from"./ToolViewManager.js";import{GlyphMosaic as A}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as P}from"./3d/support/DefaultHighlights.js";import D from"./input/Input.js";import{ViewEvents as U}from"./input/ViewEvents.js";import z from"./navigation/Navigation.js";import{deduplicateAttributionItems as G}from"./support/attributionUtils.js";import{DefaultsFromMap as N}from"./support/DefaultsFromMap.js";import{defaultHighlightName as $}from"./support/HighlightDefaults.js";import B from"./support/HighlightOptions.js";import J from"./support/LayerViewManager.js";import K from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as Q}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as X}from"./support/WebGLRequirements.js";var Y;let ee=class extends(n(m)){static{Y=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new a({getCollections:()=>this.layerviewCollections,getChildrenFunction:ie}),this.animationsEnabled=!0,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new C,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new I,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new D,this.navigation=new z,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new U(this),this.requiredFieldsOptions=new K,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new g,this.handles.add(f(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Y.views.add(this)):(this._lockedSpatialReference=null,Y.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this._glyphMosaic=new A(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},w)),this.analyses=new x}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,v(()=>this.ready)))),this.basemapView=new H({view:this}),this.layerViewManager=new J({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new W({view:this}),this.selectionManager=new Z({view:this}),this.addHandles([_(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{d.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),f(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},M),f(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},w),f(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},M)])}get _layerToLayerviewMapping(){return Y._layerToLayerview}static{this._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]]}destroy(){this.destroyed||(Y.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get("analyses")}set analyses(e){this._set("analyses",e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get attributionItems(){return this.suspended?[]:G(this._get("attributionItems"),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new N({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get("highlights")??P()}set highlights(e){this._set("highlights",s(e,this._get("highlights"),r.ofType(B)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===$)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;const{map:e,spatialReference:t}=this;return!(this.fatalError||!this._isValid||this._readyCycleForced||!e||h(e)&&!e.loaded||0===this.width||0===this.height||!t||!this._validateSpatialReference(t)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(d.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),h(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const{_userSpatialReference:e}=this;if(e&&null!==e.vcsWkid)return e;const t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,i=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return i?.equals(t)?i:t}set spatialReference(e){const t=!L(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??(this.ready?this._lockedSpatialReference:null)}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??F}set timeZone(e){this._userTimeZone=e,k(e)||d.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},a=p(()=>i.remove(r));return i.add(r),this.addHandles(a),a}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new q}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){const e=X(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn("#validate()",e.message),e;const t=await Q();if(t)throw d.getLogger(this).warn("#validate()",t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(_(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}_displayWebGLError(){const e=document.createElement("div");e.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const t=document.createElement("div");t.innerHTML="Unable to display map. WebGL2 support is required.",t.setAttribute("style","font-size: 24px; font-weight: bold;");const i=document.createElement("div");i.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",i.setAttribute("style","font-size: 18px;");const r=document.createElement("a");r.innerHTML="https://esriurl.com/webgl-faq",r.target="_blank",r.setAttribute("style","font-size: 18px;"),r.href="https://esriurl.com/webgl-faq",e.appendChild(t),e.appendChild(i),e.appendChild(r);const a=this.getSurface();a&&a.appendChild(e)}};e([V()],ee.prototype,"_userSpatialReference",void 0),e([V()],ee.prototype,"activeTool",null),e([V({readOnly:!0})],ee.prototype,"allLayerViews",void 0),e([V({readOnly:!0})],ee.prototype,"layerviewCollections",null),e([V(R(x,"analyses"))],ee.prototype,"analyses",null),e([V()],ee.prototype,"animation",null),e([V()],ee.prototype,"animationsEnabled",void 0),e([V({readOnly:!0})],ee.prototype,"attributionItems",null),e([V()],ee.prototype,"attributionVisible",void 0),e([V()],ee.prototype,"basemapView",void 0),e([V()],ee.prototype,"center",null),e([V()],ee.prototype,"defaultsFromMapSettings",null),e([V()],ee.prototype,"defaultsFromMap",null),e([V()],ee.prototype,"dependencies",void 0),e([V()],ee.prototype,"displayFilterEnabled",void 0),e([V({type:T})],ee.prototype,"extent",null),e([V()],ee.prototype,"fatalError",void 0),e([V(R(C,"graphics"))],ee.prototype,"graphics",void 0),e([V({readOnly:!0,type:j})],ee.prototype,"heightModelInfo",null),e([V({type:r.ofType(B)})],ee.prototype,"highlights",null),e([V({readOnly:!0})],ee.prototype,"interacting",null),e([V({constructOnly:!0})],ee.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],ee.prototype,"navigating",null),e([V({readOnly:!0})],ee.prototype,"preconditionsReady",null),e([V({readOnly:!0})],ee.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],ee.prototype,"layerViews",void 0),e([V()],ee.prototype,"resolution",null),e([V({type:I})],ee.prototype,"magnifier",void 0),e([V({value:null,type:t})],ee.prototype,"map",null),e([V()],ee.prototype,"padding",void 0),e([V({readOnly:!0})],ee.prototype,"ready",void 0),e([V({readOnly:!0})],ee.prototype,"canZoomIn",null),e([V({readOnly:!0})],ee.prototype,"canZoomOut",null),e([V()],ee.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],ee.prototype,"readyState",null),e([V({type:E})],ee.prototype,"spatialReference",null),e([V()],ee.prototype,"stationary",null),e([V({type:O})],ee.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],ee.prototype,"timeZone",null),e([V()],ee.prototype,"tools",null),e([V()],ee.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],ee.prototype,"type",void 0),e([V({type:Number})],ee.prototype,"scale",void 0),e([V({readOnly:!0})],ee.prototype,"updating",void 0),e([V({readOnly:!0})],ee.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],ee.prototype,"initialExtent",null),e([V()],ee.prototype,"cursor",null),e([V({readOnly:!0})],ee.prototype,"input",void 0),e([V({type:z,nonNullable:!0})],ee.prototype,"navigation",void 0),e([V()],ee.prototype,"layerViewManager",void 0),e([V()],ee.prototype,"analysisViewManager",void 0),e([V()],ee.prototype,"selectionManager",void 0),e([V()],ee.prototype,"width",void 0),e([V()],ee.prototype,"height",void 0),e([V({readOnly:!0})],ee.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],ee.prototype,"size",null),e([V({readOnly:!0})],ee.prototype,"suspended",void 0),e([V({readOnly:!0})],ee.prototype,"viewEvents",void 0),e([V()],ee.prototype,"_isValid",void 0),e([V()],ee.prototype,"_readyCycleForced",void 0),e([V()],ee.prototype,"_lockedSpatialReference",void 0),e([V()],ee.prototype,"_userTimeZone",void 0),e([V()],ee.prototype,"_lockedTimeZone",void 0),e([V()],ee.prototype,"_userTimeExtent",void 0),e([V()],ee.prototype,"_lockedTimeExtent",void 0),e([V({type:q})],ee.prototype,"theme",void 0),e([V({readOnly:!0,type:q})],ee.prototype,"effectiveTheme",null),e([V({readOnly:!0})],ee.prototype,"registeredComponents",void 0),ee=Y=e([b("esri.views.View")],ee);const te=globalThis.$arcgis;function ie(e){return e.layerViews}te&&!te.views&&Object.defineProperty(te,"views",{configurable:!1,enumerable:!0,writable:!1,value:ee.views});export{ee as default};
2
+ import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as h}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import g from"../core/ReactiveSet.js";import{watch as f,sync as w,whenOnce as v,when as _,syncAndInitial as M}from"../core/reactiveUtils.js";import{property as V,subclass as b}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import T from"../geometry/Extent.js";import j from"../geometry/HeightModelInfo.js";import E from"../geometry/SpatialReference.js";import{equals as L}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as F}from"../support/AnalysesCollection.js";import{GraphicsCollection as x}from"../support/GraphicsCollection.js";import{system as C}from"../time/constants.js";import O from"../time/TimeExtent.js";import{isTimeZoneValid as k}from"../time/timeZoneUtils.js";import H from"./BasemapView.js";import I from"./Magnifier.js";import Z from"./SelectionManager.js";import q from"./Theme.js";import{ToolViewManager as W}from"./ToolViewManager.js";import{GlyphMosaic as A}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as P}from"./3d/support/DefaultHighlights.js";import D from"./input/Input.js";import{ViewEvents as U}from"./input/ViewEvents.js";import z from"./interactive/options/ViewOptions.js";import N from"./navigation/Navigation.js";import{deduplicateAttributionItems as G}from"./support/attributionUtils.js";import{DefaultsFromMap as $}from"./support/DefaultsFromMap.js";import{defaultHighlightName as B}from"./support/HighlightDefaults.js";import J from"./support/HighlightOptions.js";import K from"./support/LayerViewManager.js";import Q from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as X}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as Y}from"./support/WebGLRequirements.js";var ee;let te=class extends(n(m)){static{ee=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new s({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new x,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new I,this.options=new z,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new D,this.navigation=new N,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new U(this),this.requiredFieldsOptions=new Q,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new g,this.handles.add(f(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,ee.views.add(this)):(this._lockedSpatialReference=null,ee.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this._glyphMosaic=new A(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},w)),this.analyses=new F}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,v(()=>this.ready)))),this.basemapView=new H({view:this}),this.layerViewManager=new K({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new W({view:this}),this.selectionManager=new Z({view:this}),this.addHandles([_(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{d.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),f(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},M),f(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},w),f(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},M),f(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},M)])}get _layerToLayerviewMapping(){return ee._layerToLayerview}static{this._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]]}destroy(){this.destroyed||(ee.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get("analyses")}set analyses(e){this._set("analyses",e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get attributionItems(){return this.suspended?[]:G(this._get("attributionItems"),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new $({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get("highlights")??P()}set highlights(e){this._set("highlights",a(e,this._get("highlights"),r.ofType(J)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===B)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;const{map:e,spatialReference:t}=this;return!(this.fatalError||!this._isValid||this._readyCycleForced||!e||h(e)&&!e.loaded||0===this.width||0===this.height||!t||!this._validateSpatialReference(t)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(d.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),h(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const{_userSpatialReference:e}=this;if(e&&null!==e.vcsWkid)return e;const t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,i=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return i?.equals(t)?i:t}set spatialReference(e){const t=!L(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??C}set timeZone(e){this._userTimeZone=e,k(e)||d.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},s=p(()=>i.remove(r));return i.add(r),this.addHandles(s),s}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new q}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){const e=Y(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn("#validate()",e.message),e;const t=await X();if(t)throw d.getLogger(this).warn("#validate()",t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(_(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}_displayWebGLError(){const e=document.createElement("div");e.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const t=document.createElement("div");t.innerHTML="Unable to display map. WebGL2 support is required.",t.setAttribute("style","font-size: 24px; font-weight: bold;");const i=document.createElement("div");i.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",i.setAttribute("style","font-size: 18px;");const r=document.createElement("a");r.innerHTML="https://esriurl.com/webgl-faq",r.target="_blank",r.setAttribute("style","font-size: 18px;"),r.href="https://esriurl.com/webgl-faq",e.appendChild(t),e.appendChild(i),e.appendChild(r);const s=this.getSurface();s&&s.appendChild(e)}};e([V()],te.prototype,"_userSpatialReference",void 0),e([V()],te.prototype,"activeTool",null),e([V({readOnly:!0})],te.prototype,"allLayerViews",void 0),e([V({readOnly:!0})],te.prototype,"layerviewCollections",null),e([V(R(F,"analyses"))],te.prototype,"analyses",null),e([V()],te.prototype,"animation",null),e([V()],te.prototype,"animationsEnabled",void 0),e([V({readOnly:!0})],te.prototype,"attributionItems",null),e([V()],te.prototype,"attributionVisible",void 0),e([V()],te.prototype,"basemapView",void 0),e([V()],te.prototype,"center",null),e([V()],te.prototype,"defaultsFromMapSettings",null),e([V()],te.prototype,"defaultsFromMap",null),e([V()],te.prototype,"dependencies",void 0),e([V()],te.prototype,"displayFilterEnabled",void 0),e([V({type:T})],te.prototype,"extent",null),e([V()],te.prototype,"fatalError",void 0),e([V(R(x,"graphics"))],te.prototype,"graphics",void 0),e([V({readOnly:!0,type:j})],te.prototype,"heightModelInfo",null),e([V({type:r.ofType(J)})],te.prototype,"highlights",null),e([V({readOnly:!0})],te.prototype,"interacting",null),e([V({constructOnly:!0})],te.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],te.prototype,"navigating",null),e([V({readOnly:!0})],te.prototype,"preconditionsReady",null),e([V({readOnly:!0})],te.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],te.prototype,"layerViews",void 0),e([V()],te.prototype,"resolution",null),e([V({type:I})],te.prototype,"magnifier",void 0),e([V({nonNullable:!0,type:z})],te.prototype,"options",void 0),e([V({value:null,type:t})],te.prototype,"map",null),e([V()],te.prototype,"padding",void 0),e([V({readOnly:!0})],te.prototype,"ready",void 0),e([V({readOnly:!0})],te.prototype,"canZoomIn",null),e([V({readOnly:!0})],te.prototype,"canZoomOut",null),e([V()],te.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],te.prototype,"readyState",null),e([V({type:E})],te.prototype,"spatialReference",null),e([V()],te.prototype,"stationary",null),e([V({type:O})],te.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],te.prototype,"timeZone",null),e([V()],te.prototype,"tools",null),e([V()],te.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],te.prototype,"type",void 0),e([V({type:Number})],te.prototype,"scale",void 0),e([V({readOnly:!0})],te.prototype,"updating",void 0),e([V({readOnly:!0})],te.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],te.prototype,"initialExtent",null),e([V()],te.prototype,"cursor",null),e([V({readOnly:!0})],te.prototype,"input",void 0),e([V({type:N,nonNullable:!0})],te.prototype,"navigation",void 0),e([V()],te.prototype,"layerViewManager",void 0),e([V()],te.prototype,"analysisViewManager",void 0),e([V()],te.prototype,"selectionManager",void 0),e([V()],te.prototype,"width",void 0),e([V()],te.prototype,"height",void 0),e([V({readOnly:!0})],te.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],te.prototype,"size",null),e([V({readOnly:!0})],te.prototype,"suspended",void 0),e([V({readOnly:!0})],te.prototype,"viewEvents",void 0),e([V()],te.prototype,"_isValid",void 0),e([V()],te.prototype,"_readyCycleForced",void 0),e([V()],te.prototype,"_lockedSpatialReference",void 0),e([V()],te.prototype,"_userTimeZone",void 0),e([V()],te.prototype,"_lockedTimeZone",void 0),e([V()],te.prototype,"_userTimeExtent",void 0),e([V()],te.prototype,"_lockedTimeExtent",void 0),e([V({type:q})],te.prototype,"theme",void 0),e([V({readOnly:!0,type:q})],te.prototype,"effectiveTheme",null),e([V({readOnly:!0})],te.prototype,"registeredComponents",void 0),te=ee=e([b("esri.views.View")],te);const ie=globalThis.$arcgis;function re(e){return e.layerViews}ie&&!ie.views&&Object.defineProperty(ie,"views",{configurable:!1,enumerable:!0,writable:!1,value:te.views});export{te as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{dedupeResult as r}from"../../../core/dedupeResult.js";import{equalsShallow as t}from"../../../core/lang.js";import{watch as o}from"../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../core/units.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";import{ElevationProfileLineComputation as a}from"./ElevationProfileLineComputation.js";import{getGroundMinDemResolution as l}from"./elevationProfileQuerySourceUtils.js";let u=class extends a{constructor(){super(...arguments),this.type="ground",this.numSamplesForPreview=50,this.numSamplesPerChunk=1e3,this._getStableQueryElevationDependencies=r(()=>({ground:this._ground,groundLayers:this._getStableGroundLayers()}),t),this._getStableGroundLayers=r(()=>this._ground?.layers?.toArray(),t)}get minDemResolution(){return l(this._ground)}get available(){return!0===this._ground?.layers.some(e=>e.visible)||!0===this._groundLayers?.some(e=>e.visible)}initialize(){this.addHandles([o(()=>this._queryElevationDependencies,()=>this.onInvalidate(this)),o(()=>this._ground,e=>{e&&!e.loaded&&e.load().catch(()=>{})},{initial:!0})])}async queryElevation(e,r){const t=this._queryElevationDependencies;if(null==t)throw new Error(`${this.declaredClass}: no dependencies`);const{ground:o}=t;if(null==o)throw new Error("No ground configured in the view");const i=await o.queryElevation(e,r),s=n(e.spatialReference),a=n(o.allLayers.at(0).spatialReference);if(s!==a){const e=i.geometry;e.points=e.points.map(([e,t,o])=>[e,t,o===r.noDataValue?o:o*a/s])}return i}get _queryElevationDependencies(){return this._getStableQueryElevationDependencies()}get _ground(){return this.controller.view?.map?.ground}get _groundLayers(){return this.controller.view?.map?.basemap?.groundLayers}};e([i()],u.prototype,"minDemResolution",null),e([i()],u.prototype,"available",null),e([i()],u.prototype,"_queryElevationDependencies",null),e([i()],u.prototype,"_ground",null),e([i()],u.prototype,"_groundLayers",null),u=e([s("esri.views.analysis.ElevationProfile.ElevationProfileLineGroundComputation")],u);export{u as ElevationProfileLineGroundComputation};
2
+ import{__decorate as e}from"tslib";import{dedupeResult as t}from"../../../core/dedupeResult.js";import{equalsShallow as r}from"../../../core/lang.js";import{watch as o}from"../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as i}from"../../../core/units.js";import{property as n,subclass as s}from"../../../core/accessorSupport/decorators.js";import{ElevationProfileLineComputation as l}from"./ElevationProfileLineComputation.js";import{getGroundMinDemResolution as a}from"./elevationProfileQuerySourceUtils.js";let u=class extends l{constructor(){super(...arguments),this.type="ground",this.numSamplesForPreview=50,this.numSamplesPerChunk=1e3,this._getStableQueryElevationDependencies=t(()=>({ground:this._ground,groundLayers:this._getStableGroundLayers()}),r),this._getStableGroundLayers=t(()=>this._ground?.allLayers?.toArray(),r)}get minDemResolution(){return a(this._ground)}get available(){return!0===this._ground?.allLayers.some(e=>e.visible)}initialize(){this.addHandles([o(()=>this._queryElevationDependencies,()=>this.onInvalidate(this)),o(()=>this._ground,e=>{e&&!e.loaded&&e.load().catch(()=>{})},{initial:!0})])}async queryElevation(e,t){const r=this._queryElevationDependencies;if(null==r)throw new Error(`${this.declaredClass}: no dependencies`);const{ground:o}=r;if(null==o)throw new Error("No ground configured in the view");const n=await o.queryElevation(e,t),s=i(e.spatialReference),l=i(o.allLayers.at(0).spatialReference);if(s!==l){const e=n.geometry;e.points=e.points.map(([e,r,o])=>[e,r,o===t.noDataValue?o:o*l/s])}return n}get _queryElevationDependencies(){return this._getStableQueryElevationDependencies()}get _ground(){return this.controller.view?.map?.ground}};e([n()],u.prototype,"minDemResolution",null),e([n()],u.prototype,"available",null),e([n()],u.prototype,"_queryElevationDependencies",null),e([n()],u.prototype,"_ground",null),u=e([s("esri.views.analysis.ElevationProfile.ElevationProfileLineGroundComputation")],u);export{u as ElevationProfileLineGroundComputation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{isSome as n,min as r}from"../../../core/arrayUtils.js";import{getMetersPerUnitForSR as l}from"../../../core/units.js";import{isGround as t}from"../../../support/groundInstanceUtils.js";function u(n){if(null==n)return null;if(t(n))return o(n);const r=n.tileInfo;if(null==r)return null;const u=r.lods?.at(-1);return null==u?null:u.resolution*l(r.spatialReference)}function o(l){if(null==l)return null;const t=l.layers.items.map(e).filter(n);return r(t)??null}function e(n){return n&&"tileInfo"in n?u(n):null}export{o as getGroundMinDemResolution,u as getQuerySourceMinDemResolution};
2
+ import{isSome as n,min as r}from"../../../core/arrayUtils.js";import{getMetersPerUnitForSR as l}from"../../../core/units.js";import{isGround as t}from"../../../support/groundInstanceUtils.js";function u(n){if(null==n)return null;if(t(n))return o(n);const r=n.tileInfo;if(null==r)return null;const u=r.lods?.at(-1);return null==u?null:u.resolution*l(r.spatialReference)}function o(l){if(null==l)return null;const t=l.allLayers.items.map(e).filter(n);return r(t)??null}function e(n){return n&&"tileInfo"in n?u(n):null}export{o as getGroundMinDemResolution,u as getQuerySourceMinDemResolution};
@@ -0,0 +1,98 @@
1
+ import type Accessor from "../../../core/Accessor.js";
2
+ import type SnappingOptions from "./SnappingOptions.js";
3
+ import type TooltipOptions from "./TooltipOptions.js";
4
+ import type Units from "../support/Units.js";
5
+ import type { SnappingOptionsProperties } from "./SnappingOptions.js";
6
+ import type { TooltipOptionsProperties } from "./TooltipOptions.js";
7
+ import type { UnitsProperties } from "../support/Units.js";
8
+
9
+ /**
10
+ * Properties used to configure [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
11
+ *
12
+ * @beta
13
+ * @since 5.2
14
+ */
15
+ export interface ViewOptionsProperties {
16
+ /**
17
+ * Units for displaying measurements, such as lengths, areas, and volumes.
18
+ *
19
+ * @since 5.2
20
+ */
21
+ displayUnits?: UnitsProperties;
22
+ /**
23
+ * Units for interpreting numeric values entered by the user.
24
+ *
25
+ * Input units may differ from [displayUnits](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits).
26
+ *
27
+ * @since 5.2
28
+ */
29
+ inputUnits?: UnitsProperties;
30
+ /**
31
+ * Options for snapping to geometry guides and features.
32
+ *
33
+ * Snapping is disabled by default in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) and enabled by default in a
34
+ * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
35
+ *
36
+ * @since 5.2
37
+ */
38
+ snapping?: SnappingOptionsProperties;
39
+ /**
40
+ * Options for tooltips shown while sketching, editing, or placing analyses.
41
+ *
42
+ * Tooltips are disabled by default.
43
+ *
44
+ * @since 5.2
45
+ */
46
+ tooltips?: TooltipOptionsProperties;
47
+ }
48
+
49
+ /**
50
+ * Stores snapping, tooltip, and measurement unit options for supported components and analyses configured to inherit these options from the view.
51
+ * Configure these options through [View.options](https://developers.arcgis.com/javascript/latest/references/core/views/View/#options).
52
+ *
53
+ * > [!IMPORTANT]
54
+ * >
55
+ * > These options are not saved in a [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/) or [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/).
56
+ *
57
+ * @beta
58
+ * @since 5.2
59
+ */
60
+ export default class ViewOptions extends Accessor {
61
+ /** @since 5.2 */
62
+ constructor(properties?: ViewOptionsProperties);
63
+ /**
64
+ * Units for displaying measurements, such as lengths, areas, and volumes.
65
+ *
66
+ * @since 5.2
67
+ */
68
+ get displayUnits(): Units;
69
+ set displayUnits(value: UnitsProperties);
70
+ /**
71
+ * Units for interpreting numeric values entered by the user.
72
+ *
73
+ * Input units may differ from [displayUnits](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits).
74
+ *
75
+ * @since 5.2
76
+ */
77
+ get inputUnits(): Units;
78
+ set inputUnits(value: UnitsProperties);
79
+ /**
80
+ * Options for snapping to geometry guides and features.
81
+ *
82
+ * Snapping is disabled by default in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) and enabled by default in a
83
+ * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
84
+ *
85
+ * @since 5.2
86
+ */
87
+ get snapping(): SnappingOptions;
88
+ set snapping(value: SnappingOptionsProperties);
89
+ /**
90
+ * Options for tooltips shown while sketching, editing, or placing analyses.
91
+ *
92
+ * Tooltips are disabled by default.
93
+ *
94
+ * @since 5.2
95
+ */
96
+ get tooltips(): TooltipOptions;
97
+ set tooltips(value: TooltipOptionsProperties);
98
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import{property as p,subclass as s}from"../../../core/accessorSupport/decorators.js";import i from"./SnappingOptions.js";import n from"./TooltipOptions.js";import e from"../support/Units.js";let r=class extends t{constructor(o){super(o),this.snapping=new i,this.tooltips=new n,this.displayUnits=new e,this.inputUnits=new e}};o([p({nonNullable:!0,type:i})],r.prototype,"snapping",void 0),o([p({nonNullable:!0,type:n})],r.prototype,"tooltips",void 0),o([p({nonNullable:!0,type:e})],r.prototype,"displayUnits",void 0),o([p({nonNullable:!0,type:e})],r.prototype,"inputUnits",void 0),r=o([s("esri.views.interactive.options.ViewOptions")],r);const l=r;export{l as default};
@@ -1,12 +1,14 @@
1
1
  import type Accessor from "../../../core/Accessor.js";
2
- import type { SystemOrAreaUnit, SystemOrLengthUnit } from "../../../core/units.js";
2
+ import type { SystemOrAreaUnit, SystemOrLengthUnit, SystemOrVolumeUnit } from "../../../core/units.js";
3
3
 
4
4
  /** @since 5.2 */
5
- export interface UnitsProperties extends Partial<Pick<Units, "area" | "length" | "verticalLength">> {}
5
+ export interface UnitsProperties extends Partial<Pick<Units, "area" | "length" | "verticalLength" | "volume">> {}
6
6
 
7
7
  /**
8
8
  * Units used for displaying or interpreting values in the UI while sketching, editing, or placing analyses.
9
9
  *
10
+ * Each quantity accepts a specific unit or measurement system (`"metric"` or `"imperial"`).
11
+ *
10
12
  * @since 5.2
11
13
  */
12
14
  export default class Units extends Accessor {
@@ -30,4 +32,10 @@ export default class Units extends Accessor {
30
32
  * @since 5.2
31
33
  */
32
34
  accessor verticalLength: SystemOrLengthUnit | null | undefined;
35
+ /**
36
+ * Volume units.
37
+ *
38
+ * @since 5.2
39
+ */
40
+ accessor volume: SystemOrVolumeUnit | null | undefined;
33
41
  }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import o from"../../../core/Accessor.js";import{property as r,subclass as e}from"../../../core/accessorSupport/decorators.js";let s=class extends o{constructor(t){super(t),this.length=null,this.verticalLength=null,this.area=null}};t([r()],s.prototype,"length",void 0),t([r()],s.prototype,"verticalLength",void 0),t([r()],s.prototype,"area",void 0),s=t([e("esri.views.interactive.support.Units")],s);const i=s;export{i as default};
2
+ import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import{property as r,subclass as e}from"../../../core/accessorSupport/decorators.js";let s=class extends t{constructor(o){super(o)}};o([r()],s.prototype,"length",void 0),o([r()],s.prototype,"verticalLength",void 0),o([r()],s.prototype,"area",void 0),o([r()],s.prototype,"volume",void 0),s=o([e("esri.views.interactive.support.Units")],s);const p=s;export{p as default};
@@ -1,4 +1,3 @@
1
- import type Graphic from "../../Graphic.js";
2
1
  import type AnnotationFeatureLayer from "../../layers/AnnotationFeatureLayer.js";
3
2
  import type CSVLayer from "../../layers/CSVLayer.js";
4
3
  import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
@@ -23,7 +22,7 @@ import type HighlightOptions from "../support/HighlightOptions.js";
23
22
  import type { ResourceHandle } from "../../core/Handles.js";
24
23
  import type { AbortOptions } from "../../core/promiseUtils.js";
25
24
  import type { QueryProperties } from "../../rest/support/Query.js";
26
- import type { ObjectId } from "../types.js";
25
+ import type { HighlightTarget, ObjectId } from "../types.js";
27
26
  import type { LayerViewHighlightOptions } from "./types.js";
28
27
  import type { HighlightOptionsProperties } from "../support/HighlightOptions.js";
29
28
  import type { FeatureEffectProperties } from "../../layers/support/FeatureEffect.js";
@@ -415,15 +414,20 @@ export default abstract class FeatureLikeLayerView extends LayerView {
415
414
  * from the view's [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection. If no `name` is provided, the
416
415
  * feature will use the `default` highlight options.
417
416
  *
417
+ * The `highlight()` method can highlight features using either a list of graphics or objectIDs, or a [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/).
418
+ * Graphics and objectIDs highlight the specified features. A [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/) highlights features that match the filter, such as cities with a population
419
+ * greater than a specified value. As features become available while navigating the map, features that match the specified objectIDs or filter are highlighted.
420
+ *
418
421
  * Release-specific changes:
422
+ * * As of version 5.2, [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/) can be used as a target to highlight features that match a filter. This option is supported only in 2D, with [2D MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) and
423
+ * the [map component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/).
419
424
  * * As of version 4.32, the `highlight` method accepts an `options` parameter which can be used to provide a [HighlightOptions.name](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/#name)
420
425
  * to apply specific [HighlightOptions](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/).
421
426
  * If no `name` is provided, the `default` highlight options will be used.
422
427
  * * As of version 4.23, the `highlight()` method was added to [ImageryLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ImageryLayerView/#highlight),
423
428
  * supported only in a [2D MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
424
429
  *
425
- * @param target - The feature(s) to highlight. When passing a graphic or an array of graphics, each feature must have a valid `objectID`.
426
- * You may alternatively pass one or more objectIDs as a single number, string, or an array of numbers or strings.
430
+ * @param target - The feature or features to highlight. The highlight target can be a graphic, an array of graphics, one or more objectIDs (provided as a number, string, or array of numbers or strings), or a [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/). If graphics are provided, each feature must have a valid `objectID`.
427
431
  * @param options - An additional set of options to customize the highlight behavior.
428
432
  * @returns Returns a highlight handler with a `remove()` method that can be called to remove the highlight.
429
433
  * @see [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights)
@@ -479,8 +483,26 @@ export default abstract class FeatureLikeLayerView extends LayerView {
479
483
  * });
480
484
  * });
481
485
  * ```
486
+ * @example
487
+ * ```js
488
+ * // Use a spatial FeatureFilter to highlight features within 3 miles of
489
+ * // the pointer as it moves.
490
+ * viewElement.addEventListener("arcgisViewPointerMove", ({ detail: { x, y } }) => {
491
+ * const mapPoint = viewElement.toMap({ x, y });
492
+ *
493
+ * highlightHandle?.remove();
494
+ *
495
+ * highlightHandle = layerView.highlight(
496
+ * new FeatureFilter({
497
+ * geometry: mapPoint,
498
+ * distance: 3,
499
+ * units: "miles",
500
+ * }),
501
+ * );
502
+ * });
503
+ * ```
482
504
  */
483
- abstract highlight(target: Graphic | Graphic[] | ObjectId | ObjectId[], options?: LayerViewHighlightOptions): ResourceHandle;
505
+ abstract highlight(target: HighlightTarget, options?: LayerViewHighlightOptions): ResourceHandle;
484
506
  /**
485
507
  * Executes a [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) against aggregate features (i.e. clusters or bins)
486
508
  * available for drawing in the layerView
@@ -58,15 +58,20 @@ export default abstract class GraphicsLayerView extends LayerView {
58
58
  * from the view's [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection. If no `name` is provided, the
59
59
  * feature will use the `default` highlight options.
60
60
  *
61
+ * The `highlight()` method can highlight features using either a list of graphics or objectIDs, or a [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/).
62
+ * Graphics and objectIDs highlight the specified features. A [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/) highlights features that match the filter, such as cities with a population
63
+ * greater than a specified value. As features become available while navigating the map, features that match the specified objectIDs or filter are highlighted.
64
+ *
61
65
  * Release-specific changes:
66
+ * * As of version 5.2, [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/) can be used as a target to highlight features that match a filter. This option is supported only in 2D, with [2D MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) and
67
+ * the [map component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/).
62
68
  * * As of version 4.32, the `highlight` method accepts an `options` parameter which can be used to provide a [HighlightOptions.name](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/#name)
63
69
  * to apply specific [HighlightOptions](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/).
64
70
  * If no `name` is provided, the `default` highlight options will be used.
65
71
  * * As of version 4.23, the `highlight()` method was added to [ImageryLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ImageryLayerView/#highlight),
66
72
  * supported only in a [2D MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
67
73
  *
68
- * @param target - The feature(s) to highlight. When passing a graphic or an array of graphics, each feature must have a valid `objectID`.
69
- * You may alternatively pass one or more objectIDs as a single number, string, or an array of numbers or strings.
74
+ * @param target - The feature or features to highlight. The highlight target can be a graphic, an array of graphics, one or more objectIDs (provided as a number, string, or array of numbers or strings), or a [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/). If graphics are provided, each feature must have a valid `objectID`.
70
75
  * @param options - An additional set of options to customize the highlight behavior.
71
76
  * @returns Returns a highlight handler with a `remove()` method that can be called to remove the highlight.
72
77
  * @see [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights)
@@ -122,6 +127,24 @@ export default abstract class GraphicsLayerView extends LayerView {
122
127
  * });
123
128
  * });
124
129
  * ```
130
+ * @example
131
+ * ```js
132
+ * // Use a spatial FeatureFilter to highlight features within 3 miles of
133
+ * // the pointer as it moves.
134
+ * viewElement.addEventListener("arcgisViewPointerMove", ({ detail: { x, y } }) => {
135
+ * const mapPoint = viewElement.toMap({ x, y });
136
+ *
137
+ * highlightHandle?.remove();
138
+ *
139
+ * highlightHandle = layerView.highlight(
140
+ * new FeatureFilter({
141
+ * geometry: mapPoint,
142
+ * distance: 3,
143
+ * units: "miles",
144
+ * }),
145
+ * );
146
+ * });
147
+ * ```
125
148
  */
126
149
  abstract highlight(target: Graphic | Graphic[] | ObjectId | ObjectId[], options?: LayerViewHighlightOptions): ResourceHandle;
127
150
  /**
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import y from"./LayerView.js";import{getFetchPopupTemplate as f}from"./support/popupUtils.js";class h extends y{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async fetchPopupFeaturesAtTarget(t,i,a){const{layer:n}=this;if(!i)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:n});const{popupEnabled:l}=n,o=f(n,a);if(!l||null==o)return[];"polygon"===i.type&&(i=i.extent?.center);const m=[],{value:y,magdirValue:h,processedValue:d}=await n.identify(i,{timeExtent:this.timeExtent,signal:a?.signal});let g="";if(y?.length){g="imagery-tile"===n.type&&n.hasStandardTime()&&null!=y[0]?y.map(t=>n.getStandardTimeValue(t)).join(", "):y.join(", ");const t={ObjectId:0};t[p.servicePixelValue]="imagery-tile"===n.type&&s(n.raster)?d?.join(", "):g,t[p.rawServicePixelValue]=g;const r=n.raster?.rasterInfo??n.serviceRasterInfo,i=r?.attributeTable;if(null!=i){const{fields:e,features:r}=i,a=e.find(({name:t})=>"value"===t.toLowerCase()),s=t[p.servicePixelValue],n=a?r.find(t=>String(t.attributes[a.name])===s):null;if(n)for(const i in n.attributes)if(n.attributes.hasOwnProperty(i)){t[c+i]=n.attributes[i]}}const a=r?.dataType;"vector-magdir"!==a&&"vector-uv"!==a||(t[p.magnitude]=h?.[0],t[p.direction]=h?.[1]);const{multidimensionalDefinition:l}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});u(n.rasterFields,t,l);const{graphicOrigin:o}=n,f=new e({geometry:this.fullExtent?.clone(),attributes:t,layer:n,origin:o,sourceLayer:n});m.push(f)}return m}highlight(t,e){return i()}async getSourceScale(){return await this.layer.load(),o(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return l(this.layer.serviceRasterInfo,this.view.spatialReference)}}t([a()],h.prototype,"fullExtent",null),t([a()],h.prototype,"layer",void 0),t([a({readOnly:!0})],h.prototype,"timeExtent",null),t([a()],h.prototype,"tileInfo",void 0),t([a({readOnly:!0})],h.prototype,"hasTilingEffects",null),t([a()],h.prototype,"datumTransformation",null);export{h as default};
2
+ import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{hasTimeOptions as m,combineTimeExtent as f}from"../../layers/support/timeSupport.js";import y from"./LayerView.js";import{getFetchPopupTemplate as h}from"./support/popupUtils.js";class d extends y{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer)?f(this.layer,this.view?.timeExtent,this._get("timeExtent")):null}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async fetchPopupFeaturesAtTarget(t,i,a){const{layer:n}=this;if(!("popupTemplate"in n))return[];if(!i)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:n});const{popupEnabled:l}=n,o=h(n,a);if(!l||null==o)return[];"polygon"===i.type&&(i=i.extent?.center);const m=[],{value:f,magdirValue:y,processedValue:d}=await n.identify(i,{timeExtent:this.timeExtent,signal:a?.signal});let g="";if(f?.length){g="imagery-tile"===n.type&&n.hasStandardTime()&&null!=f[0]?f.map(t=>n.getStandardTimeValue(t)).join(", "):f.join(", ");const t={ObjectId:0};t[p.servicePixelValue]="imagery-tile"===n.type&&s(n.raster)?d?.join(", "):g,t[p.rawServicePixelValue]=g;const r=n.raster?.rasterInfo??n.serviceRasterInfo,i=r?.attributeTable;if(null!=i){const{fields:e,features:r}=i,a=e.find(({name:t})=>"value"===t.toLowerCase()),s=t[p.servicePixelValue],n=a?r.find(t=>String(t.attributes[a.name])===s):null;if(n)for(const i in n.attributes)if(n.attributes.hasOwnProperty(i)){t[c+i]=n.attributes[i]}}const a=r?.dataType;"vector-magdir"!==a&&"vector-uv"!==a||(t[p.magnitude]=y?.[0],t[p.direction]=y?.[1]);const{multidimensionalDefinition:l}=n.normalizeRasterFetchOptions({timeExtent:this.timeExtent});u(n.rasterFields,t,l);const{graphicOrigin:o}=n,h=new e({geometry:this.fullExtent?.clone(),attributes:t,layer:n,origin:o,sourceLayer:n});m.push(h)}return m}highlight(t,e){return i()}async getSourceScale(){return await this.layer.load(),o(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return l(this.layer.serviceRasterInfo,this.view.spatialReference)}}t([a()],d.prototype,"fullExtent",null),t([a()],d.prototype,"layer",void 0),t([a({readOnly:!0})],d.prototype,"timeExtent",null),t([a()],d.prototype,"tileInfo",void 0),t([a({readOnly:!0})],d.prototype,"hasTilingEffects",null),t([a()],d.prototype,"datumTransformation",null);export{d as default};
@@ -73,7 +73,7 @@ export type SelectorGeometry = Extent | Multipoint | Point | Polygon | Polyline;
73
73
  *
74
74
  * @since 5.1
75
75
  */
76
- export type SelectionToolName = "lasso" | "rectangle" | "point" | string;
76
+ export type SelectionToolName = "lasso" | "rectangle" | "polygon" | "point" | string;
77
77
 
78
78
  /**
79
79
  * An identifier used to represent a selected feature in a layer. This can either be a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) (for layers with graphics) or an object ID (for layers with object IDs).
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{createTask as n}from"../../core/asyncUtils.js";import{abortMaybe as a}from"../../core/maybe.js";import{isAborted as i,isAbortError as r}from"../../core/promiseUtils.js";import{property as l,subclass as s}from"../../core/accessorSupport/decorators.js";import{supportsHeightModelInfo as o,getLayerHeightModelInfo as p,deriveHeightModelInfoFromLayer as u}from"../../geometry/support/heightModelInfoUtils.js";import{projectWithEngineOrService as c}from"./projectionUtils.js";let d=class extends t{constructor(e){super(e),this.required={extent:!1,heightModelInfo:!1,tileInfo:!1},this.defaultSpatialReference=null,this.inputSpatialReference=null,this.sourcePreloadCount=10,this.priorityCollection=null,this.requiresExtentInSpatialReference=!0,this.viewReady=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._projectExtentTask.task&&(this._projectExtentTask.task=a(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return this.inputSpatialReference??this._spatialReferenceTask.spatialReference}get extent(){return this._extentTask.extent}get heightModelInfo(){return this._heightModelInfoTask.heightModelInfo}get combinedHorizontalAndVerticalSpatialReference(){return this.heightModelInfoReady?this._heightModelInfoTask.spatialReference:null}get viewingMode(){return null==this.inputSpatialReference||this.inputSpatialReference.equals(this._spatialReferenceTask.spatialReference)?this._spatialReferenceTask.viewingMode??null:null}get tileInfo(){return this._tileInfoTask.tileInfo}get mapCollections(){const e=this.map?.(),t=[];return null!=this.priorityCollection&&t.push(this.priorityCollection),t.push({parent:e?.basemap,layers:e?.basemap?.baseLayers},{parent:e?.basemap,layers:e?.basemap?.groundLayers},{layers:e?.layers},{parent:e?.ground,layers:e?.ground?.layers},{parent:e?.basemap,layers:e?.basemap?.referenceLayers}),t}get _spatialReferenceTask(){if(this.viewReady)return this._get("_spatialReferenceTask")??{updating:!1};const{spatialReference:e,viewingMode:t,updating:n}=this._combinedSpatialReferenceTask(null,!1);return{spatialReference:e,viewingMode:t,updating:n}}get _heightModelInfoTask(){if(!this.required.heightModelInfo)return{updating:!1};const e=this.viewReady?this._get("_heightModelInfoTask"):null;return e&&!e.updating&&e.heightModelInfo?e:this._combinedSpatialReferenceTask(this.inputSpatialReference,!0)}_combinedSpatialReferenceTask(e,t){let n=e?[new f(e,null,null)]:null;const a=()=>1===n?.length&&(!t||null!=n[0].heightModelInfo);if(this._collectLayers(this.mapCollections,e=>{const t=this._getSupportedSpatialReferences(e);if(t.length>0){const e=this._narrowDownSpatialReferenceCandidates(n,t);null!=e&&(n=e)}return!!a()})&&!a())return{updating:!0};const i=this._pickSpatialReferenceCandidate(n);return{heightModelInfo:i?.heightModelInfo??null,spatialReference:i?.spatialReference??null,viewingMode:i?.viewingMode??null,updating:!1}}get _tileInfoTask(){if(!this.required.tileInfo)return this._get("_tileInfoTask")??{updating:!1};const e=this.map?.(),t=this.spatialReference;if(!t)return{updating:this._spatialReferenceTask.updating};let n;const a=this._collectLayers([{parent:e?.basemap,layers:e?.basemap?.baseLayers},{parent:e?.basemap,layers:e?.basemap?.groundLayers},{layers:e?.layers}],e=>!(!("tileInfo"in e)||!e.tileInfo?.spatialReference.equals(t))&&(n=e,!0),e=>"tileInfo"in e);if(n){return{tileInfo:n.tileInfo,updating:!1}}return{updating:a}}get _extentCandidatesTask(){if(this.viewReady||!this.required.extent)return this._get("_extentCandidatesTask")??{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const e=[],t=this._collectLayers(this.mapCollections,t=>{const n="fullExtents"in t&&t.fullExtents||(null!=t.fullExtent?[t.fullExtent]:[]),a=this.requiresExtentInSpatialReference?null:n[0],i=n.find(e=>e.spatialReference.equals(this.spatialReference))??a;if(i)return e.push({extent:i,layer:t}),!0;if(this._getSupportedSpatialReferences(t).length>0)for(const r of n)e.push({extent:r,layer:t});return!1});return{candidates:e,updating:t}}get _extentTask(){const{candidates:e,updating:t}=this._extentCandidatesTask;if(t)return{updating:t};if(null==e||0===e.length)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const r=this._pickExtentCandidate(e),l=this.spatialReference;return r.extent.equals(this._projectExtentTask.input)&&l.equals(this._projectExtentTask.spatialReference)?{extent:this._projectExtentTask.output,updating:null!=this._projectExtentTask.task&&!this._projectExtentTask.task.finished}:(null!=this._projectExtentTask.task&&(this._projectExtentTask.task=a(this._projectExtentTask.task)),this._projectExtentTask={input:r.extent.clone(),output:null,spatialReference:l.clone(),task:n(async e=>{try{const t=await c(r.extent,l,"portalItem"in r.layer?r.layer.portalItem:void 0,e);this._projectExtentTask={...this._projectExtentTask,task:null,output:t}}catch(t){if(i(e))return;this._projectExtentTask={...this._projectExtentTask,task:null}}})},{updating:!0})}_narrowDownSpatialReferenceCandidates(e,t){if(null==e)return t;const n=new Array;for(const a of e)for(const e of t){if(!a.spatialReference.equals(e.spatialReference))continue;const t=g(a.viewingMode,e.viewingMode);if(!1!==t){const i=e.heightModelInfo&&!a.heightModelInfo;n.push(new f(i?e.spatialReference:a.spatialReference,i?e.heightModelInfo:a.heightModelInfo,t));break}}return n.length>0?n:null}_pickSpatialReferenceCandidate(e){const t=this.defaultSpatialReference;if(!e?.length)return t?{heightModelInfo:null,spatialReference:t,viewingMode:null}:null;return(e.length>1&&t?e.find(({spatialReference:e})=>e.equals(t)):null)??e[0]}_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===t.length)return[];const n=this.required.heightModelInfo&&o(e),a=p(e),i=[];for(const r of t){const t=this.getSpatialReferenceSupport(r,e);if(null!=t){const l=t.constraints??[{spatialReference:r,viewingMode:null}];for(const{spatialReference:t,viewingMode:r}of l)if(!this.requiresExtentInSpatialReference||(this.inputSpatialReference?.equals(t)??!0)){const l=n?a??u(e,t):null;i.push(new f(t,l,r))}}}return i}_pickExtentCandidate(e){const t=this.spatialReference;return e.find(({extent:e})=>t.equals(e.spatialReference))||e[0]}_collectLayers(e,t,n=()=>!0){switch(this._loadMaybe(this.map?.())){case"loading":return!0;case"failed":return!1}const a=new h(n,t);for(const i of e)if(this._collectCollection(i,a),a.done||a.preloading===this.sourcePreloadCount)break;return a.updating}_collectCollection(e,t){if(e.layers){switch(this._loadMaybe(e.parent)){case"loading":return t.updating=!0,void++t.preloading;case"failed":return}for(const n of e.layers)if(("graphics"!==n.type||!n.internal)&&t.layerFilter(n)){switch(this._loadMaybe(n)){case"failed":continue;case"loading":t.updating=!0,++t.preloading;break;case"loaded":if(t.updating||(t.done=t.pushLayer(n)),t.done||t.preloading===this.sourcePreloadCount)break;"layers"in n&&this._collectCollection({layers:n.layers},t)}if(t.done||t.preloading===this.sourcePreloadCount)break}}}_loadMaybe(e){return e&&"loadStatus"in e&&null!=e.loadStatus?"not-loaded"===e.loadStatus?(e.load().catch(e=>{r(e)}),"loading"):e.loadStatus:"loaded"}};e([l()],d.prototype,"required",void 0),e([l({constructOnly:!0})],d.prototype,"map",void 0),e([l({constructOnly:!0})],d.prototype,"getSpatialReferenceSupport",void 0),e([l()],d.prototype,"defaultSpatialReference",void 0),e([l()],d.prototype,"inputSpatialReference",void 0),e([l()],d.prototype,"sourcePreloadCount",void 0),e([l()],d.prototype,"priorityCollection",void 0),e([l()],d.prototype,"requiresExtentInSpatialReference",void 0),e([l()],d.prototype,"viewReady",void 0),e([l({readOnly:!0})],d.prototype,"ready",null),e([l({readOnly:!0})],d.prototype,"heightModelInfoReady",null),e([l({readOnly:!0})],d.prototype,"spatialReference",null),e([l({readOnly:!0})],d.prototype,"extent",null),e([l({readOnly:!0})],d.prototype,"heightModelInfo",null),e([l({readOnly:!0})],d.prototype,"combinedHorizontalAndVerticalSpatialReference",null),e([l({readOnly:!0})],d.prototype,"viewingMode",null),e([l({readOnly:!0})],d.prototype,"tileInfo",null),e([l({readOnly:!0})],d.prototype,"mapCollections",null),e([l({readOnly:!0})],d.prototype,"_spatialReferenceTask",null),e([l({readOnly:!0})],d.prototype,"_heightModelInfoTask",null),e([l({readOnly:!0})],d.prototype,"_tileInfoTask",null),e([l({readOnly:!0})],d.prototype,"_extentCandidatesTask",null),e([l()],d.prototype,"_extentTask",null),e([l()],d.prototype,"_projectExtentTask",void 0),d=e([s("esri.views.support.DefaultsFromMap")],d);class f{constructor(e,t,n){this.spatialReference=e,this.heightModelInfo=t,this.viewingMode=n}}class h{constructor(e,t){this.layerFilter=e,this.pushLayer=t,this.preloading=-1,this.updating=!1,this.done=!1}}function g(e,t){return null!=e?null!=t?e===t&&e:e:t}export{d as DefaultsFromMap};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{createTask as n}from"../../core/asyncUtils.js";import{abortMaybe as a}from"../../core/maybe.js";import{isAborted as i,isAbortError as r}from"../../core/promiseUtils.js";import{property as l,subclass as s}from"../../core/accessorSupport/decorators.js";import{isCompatible as o,supportsHeightModelInfo as p,getLayerHeightModelInfo as u,deriveHeightModelInfoFromLayer as c}from"../../geometry/support/heightModelInfoUtils.js";import{projectWithEngineOrService as d}from"./projectionUtils.js";let f=class extends t{constructor(e){super(e),this.required={extent:!1,heightModelInfo:!1,tileInfo:!1},this.defaultSpatialReference=null,this.inputSpatialReference=null,this.inputHeightModelInfo=null,this.sourcePreloadCount=10,this.priorityCollection=null,this.requiresExtentInSpatialReference=!0,this.viewReady=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._projectExtentTask.task&&(this._projectExtentTask.task=a(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return this.inputSpatialReference??this._spatialReferenceTask.spatialReference}get extent(){return this._extentTask.extent}get heightModelInfo(){return this._heightModelInfoTask.heightModelInfo}get combinedHorizontalAndVerticalSpatialReference(){return this.heightModelInfoReady?this._heightModelInfoTask.spatialReference:null}get viewingMode(){return null==this.inputSpatialReference||this.inputSpatialReference.equals(this._spatialReferenceTask.spatialReference)?this._spatialReferenceTask.viewingMode??null:null}get tileInfo(){return this._tileInfoTask.tileInfo}get mapCollections(){const e=this.map?.(),t=[];return null!=this.priorityCollection&&t.push(this.priorityCollection),t.push({parent:e?.basemap,layers:e?.basemap?.baseLayers},{parent:e?.basemap,layers:e?.basemap?.groundLayers},{layers:e?.layers},{parent:e?.ground,layers:e?.ground?.layers},{parent:e?.basemap,layers:e?.basemap?.referenceLayers}),t}get _spatialReferenceTask(){if(this.viewReady)return this._get("_spatialReferenceTask")??{updating:!1};const{spatialReference:e,viewingMode:t,updating:n}=this._combinedSpatialReferenceTask(!1);return{spatialReference:e,viewingMode:t,updating:n}}get _heightModelInfoTask(){if(!this.required.heightModelInfo)return{updating:!1};const e=this.viewReady?this._get("_heightModelInfoTask"):null;return e&&!e.updating&&e.heightModelInfo?e:this._combinedSpatialReferenceTask(!0)}_combinedSpatialReferenceTask(e){let t=null;const n=()=>1===t?.length&&(!e||null!=t[0].heightModelInfo);if(this._collectLayers(this.mapCollections,a=>{const i=this._getSupportedSpatialReferences(a,e);if(i.length>0){const e=this._narrowDownSpatialReferenceCandidates(t,i);null!=e&&(t=e)}return!!n()})&&!n())return{updating:!0};const a=this._pickSpatialReferenceCandidate(t);return{heightModelInfo:a?.heightModelInfo??null,spatialReference:a?.spatialReference??null,viewingMode:a?.viewingMode??null,updating:!1}}get _tileInfoTask(){if(!this.required.tileInfo)return this._get("_tileInfoTask")??{updating:!1};const e=this.map?.(),t=this.spatialReference;if(!t)return{updating:this._spatialReferenceTask.updating};let n;const a=this._collectLayers([{parent:e?.basemap,layers:e?.basemap?.baseLayers},{parent:e?.basemap,layers:e?.basemap?.groundLayers},{layers:e?.layers}],e=>!(!("tileInfo"in e)||!e.tileInfo?.spatialReference.equals(t))&&(n=e,!0),e=>"tileInfo"in e);if(n){return{tileInfo:n.tileInfo,updating:!1}}return{updating:a}}get _extentCandidatesTask(){if(this.viewReady||!this.required.extent)return this._get("_extentCandidatesTask")??{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const e=[],t=this._collectLayers(this.mapCollections,t=>{const n="fullExtents"in t&&t.fullExtents||(null!=t.fullExtent?[t.fullExtent]:[]),a=this.requiresExtentInSpatialReference?null:n[0],i=n.find(e=>e.spatialReference.equals(this.spatialReference))??a;if(i)return e.push({extent:i,layer:t}),!0;if(this._getSupportedSpatialReferences(t).length>0)for(const r of n)e.push({extent:r,layer:t});return!1});return{candidates:e,updating:t}}get _extentTask(){const{candidates:e,updating:t}=this._extentCandidatesTask;if(t)return{updating:t};if(null==e||0===e.length)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const r=this._pickExtentCandidate(e),l=this.spatialReference;return r.extent.equals(this._projectExtentTask.input)&&l.equals(this._projectExtentTask.spatialReference)?{extent:this._projectExtentTask.output,updating:null!=this._projectExtentTask.task&&!this._projectExtentTask.task.finished}:(null!=this._projectExtentTask.task&&(this._projectExtentTask.task=a(this._projectExtentTask.task)),this._projectExtentTask={input:r.extent.clone(),output:null,spatialReference:l.clone(),task:n(async e=>{try{const t=await d(r.extent,l,"portalItem"in r.layer?r.layer.portalItem:void 0,e);this._projectExtentTask={...this._projectExtentTask,task:null,output:t}}catch(t){if(i(e))return;this._projectExtentTask={...this._projectExtentTask,task:null}}})},{updating:!0})}_narrowDownSpatialReferenceCandidates(e,t){if(null==e)return t;const n=new Array;for(const a of e)for(const e of t){const t=y(a.viewingMode,e.viewingMode);if(a.spatialReference&&!a.spatialReference.equals(e.spatialReference)||0!==o(a.heightModelInfo,e.heightModelInfo,!0)||!1===t)continue;const i=e.heightModelInfo&&!a.heightModelInfo||!a.spatialReference;n.push(new h(i?e.spatialReference:a.spatialReference,i?e.heightModelInfo:a.heightModelInfo,t));break}return n.length>0?n:null}_pickSpatialReferenceCandidate(e){const t=this.defaultSpatialReference;if(!e?.length)return t?{heightModelInfo:null,spatialReference:t,viewingMode:null}:null;return(e.length>1&&t?e.find(({spatialReference:e})=>e?.equals(t)):null)??e[0]}_getSupportedSpatialReferences(e,t=!1){const n="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===n.length)return[];const a=t?this.inputHeightModelInfo:null,i=t&&p(e),r=i?u(e):null,l=[];for(const s of n){const t=this.getSpatialReferenceSupport(s,e);if(null==t)continue;const n=t.constraints??[{spatialReference:s,viewingMode:null}];for(const{spatialReference:s,viewingMode:p}of n){if(this.requiresExtentInSpatialReference&&!(this.inputSpatialReference?.equals(s)??!0))continue;const t=r??(i?c(e,s):null);0===o(a,t,!0)&&l.push(new h(s,t,p))}}return l}_pickExtentCandidate(e){const t=this.spatialReference;return e.find(({extent:e})=>t.equals(e.spatialReference))||e[0]}_collectLayers(e,t,n=()=>!0){switch(this._loadMaybe(this.map?.())){case"loading":return!0;case"failed":return!1}const a=new g(n,t);for(const i of e)if(this._collectCollection(i,a),a.done||a.preloading===this.sourcePreloadCount)break;return a.updating}_collectCollection(e,t){if(e.layers){switch(this._loadMaybe(e.parent)){case"loading":return t.updating=!0,void++t.preloading;case"failed":return}for(const n of e.layers)if(("graphics"!==n.type||!n.internal)&&t.layerFilter(n)){switch(this._loadMaybe(n)){case"failed":continue;case"loading":t.updating=!0,++t.preloading;break;case"loaded":if(t.updating||(t.done=t.pushLayer(n)),t.done||t.preloading===this.sourcePreloadCount)break;"layers"in n&&this._collectCollection({layers:n.layers},t)}if(t.done||t.preloading===this.sourcePreloadCount)break}}}_loadMaybe(e){return e&&"loadStatus"in e&&null!=e.loadStatus?"not-loaded"===e.loadStatus?(e.load().catch(e=>{r(e)}),"loading"):e.loadStatus:"loaded"}};e([l()],f.prototype,"required",void 0),e([l({constructOnly:!0})],f.prototype,"map",void 0),e([l({constructOnly:!0})],f.prototype,"getSpatialReferenceSupport",void 0),e([l()],f.prototype,"defaultSpatialReference",void 0),e([l()],f.prototype,"inputSpatialReference",void 0),e([l()],f.prototype,"inputHeightModelInfo",void 0),e([l()],f.prototype,"sourcePreloadCount",void 0),e([l()],f.prototype,"priorityCollection",void 0),e([l()],f.prototype,"requiresExtentInSpatialReference",void 0),e([l()],f.prototype,"viewReady",void 0),e([l({readOnly:!0})],f.prototype,"ready",null),e([l({readOnly:!0})],f.prototype,"heightModelInfoReady",null),e([l({readOnly:!0})],f.prototype,"spatialReference",null),e([l({readOnly:!0})],f.prototype,"extent",null),e([l({readOnly:!0})],f.prototype,"heightModelInfo",null),e([l({readOnly:!0})],f.prototype,"combinedHorizontalAndVerticalSpatialReference",null),e([l({readOnly:!0})],f.prototype,"viewingMode",null),e([l({readOnly:!0})],f.prototype,"tileInfo",null),e([l({readOnly:!0})],f.prototype,"mapCollections",null),e([l({readOnly:!0})],f.prototype,"_spatialReferenceTask",null),e([l({readOnly:!0})],f.prototype,"_heightModelInfoTask",null),e([l({readOnly:!0})],f.prototype,"_tileInfoTask",null),e([l({readOnly:!0})],f.prototype,"_extentCandidatesTask",null),e([l()],f.prototype,"_extentTask",null),e([l()],f.prototype,"_projectExtentTask",void 0),f=e([s("esri.views.support.DefaultsFromMap")],f);class h{constructor(e,t,n){this.spatialReference=e,this.heightModelInfo=t,this.viewingMode=n}}class g{constructor(e,t){this.layerFilter=e,this.pushLayer=t,this.preloading=-1,this.updating=!1,this.done=!1}}function y(e,t){return null!=e?null!=t?e===t&&e:e:t}export{f as DefaultsFromMap};
package/views/types.d.ts CHANGED
@@ -20,6 +20,7 @@ import type Layer from "../layers/Layer.js";
20
20
  import type MediaLayer from "../layers/MediaLayer.js";
21
21
  import type RouteLayer from "../layers/RouteLayer.js";
22
22
  import type BuildingSublayer from "../layers/buildingSublayers/BuildingSublayer.js";
23
+ import type FeatureFilter from "../layers/support/FeatureFilter.js";
23
24
  import type SubtypeSublayer from "../layers/support/SubtypeSublayer.js";
24
25
  import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
25
26
  import type { AbortOptions } from "../core/promiseUtils.js";
@@ -40,13 +41,18 @@ import type { ViewEventTypes } from "./input/types.js";
40
41
  export type ObjectId = number | string;
41
42
 
42
43
  /**
43
- * The feature(s) to highlight when calling [highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight) method on a LayerView instance. When passing a graphic or array of graphics,
44
- * each feature must have a valid `objectId`.
44
+ * The feature(s) to highlight when calling [highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight) method on a LayerView instance. When passing a graphic or an array of graphics,
45
+ * each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number, string, or an array of numbers or strings.
46
+ * As of version 5.2, a [FeatureFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureFilter/) can be passed as the highlight target when calling `highlight` method in [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or in
47
+ * [map component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/).
45
48
  *
46
49
  * @see [FeatureLikeLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight)
50
+ * @see [ImageryLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ImageryLayerView/#highlight)
51
+ * @see [BuildingSceneLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/BuildingSceneLayerView/#highlight)
52
+ * @see [PointCloudLayerViewMixin.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#highlight)
47
53
  * @since 5.0
48
54
  */
49
- export type HighlightTarget = Graphic | Graphic[] | Collection<Graphic>;
55
+ export type HighlightTarget = Graphic | Graphic[] | Collection<Graphic> | ObjectId | ObjectId[] | FeatureFilter;
50
56
 
51
57
  /**
52
58
  * The pixels in a single band to highlight when calling [highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ImageryLayerView/#highlight) method on
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import o from"../../Color.js";import{handlesGroup as r}from"../../core/handleUtils.js";import{memoize as t}from"../../core/memoize.js";import{watch as n}from"../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as i}from"../../core/units.js";import{property as s,subclass as l}from"../../core/accessorSupport/decorators.js";import a from"./ElevationProfileLine.js";import{getGroundMinDemResolution as u}from"./support/elevationQuerySourceUtils.js";let p=class extends a{constructor(e){super(e),this.type="ground",this.color=new o("#ff7f00"),this.viewVisualizationEnabled=!0,this.numSamplesForPreview=50,this.numSamplesPerChunk=1e3,this._getQueryElevationDependencies=t((e,o)=>({ground:e,groundLayers:o}))}get available(){const e=this._ground;return null!=e&&e.layers.some(e=>e.visible)}get minDemResolution(){return u(this._ground)}get _queryElevationDependencies(){return this._getQueryElevationDependencies(this._ground,this._groundLayers)}get _ground(){return this._viewModel?.view?.map?.ground}get _groundLayers(){return this._ground?.layers?.toArray()??[]}async queryElevation(e,o){const r=this._queryElevationDependencies;if(null==r)throw new Error("ElevationProfileLineGround: no dependencies");const{ground:t}=r;if(null==t)throw new Error("No ground configured in the view");const n=await t.queryElevation(e,o),s=i(e.spatialReference),l=i(t.layers.at(0).spatialReference);if(s!==l){const e=n.geometry;e.points=e.points.map(([e,r,t])=>[e,r,t===o.noDataValue?t:t*l/s])}return n}attach(e){return r([super.attach(e),n(()=>this._queryElevationDependencies,()=>this._onChange())])}};e([s({type:o,nonNullable:!0})],p.prototype,"color",void 0),e([s()],p.prototype,"viewVisualizationEnabled",void 0),e([s()],p.prototype,"available",null),e([s({readOnly:!0})],p.prototype,"minDemResolution",null),e([s()],p.prototype,"_queryElevationDependencies",null),e([s()],p.prototype,"_ground",null),e([s()],p.prototype,"_groundLayers",null),p=e([l("esri.widgets.ElevationProfile.ElevationProfileLineGround")],p);const d=p;export{d as default};
2
+ import{__decorate as e}from"tslib";import o from"../../Color.js";import{handlesGroup as r}from"../../core/handleUtils.js";import{memoize as t}from"../../core/memoize.js";import{watch as n}from"../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as i}from"../../core/units.js";import{property as s,subclass as l}from"../../core/accessorSupport/decorators.js";import a from"./ElevationProfileLine.js";import{getGroundMinDemResolution as u}from"./support/elevationQuerySourceUtils.js";let p=class extends a{constructor(e){super(e),this.type="ground",this.color=new o("#ff7f00"),this.viewVisualizationEnabled=!0,this.numSamplesForPreview=50,this.numSamplesPerChunk=1e3,this._getQueryElevationDependencies=t((e,o)=>({ground:e,groundLayers:o}))}get available(){const e=this._ground;return null!=e&&e.allLayers.some(e=>e.visible)}get minDemResolution(){return u(this._ground)}get _queryElevationDependencies(){return this._getQueryElevationDependencies(this._ground,this._groundLayers)}get _ground(){return this._viewModel?.view?.map?.ground}get _groundLayers(){return this._ground?.allLayers?.toArray()??[]}async queryElevation(e,o){const r=this._queryElevationDependencies;if(null==r)throw new Error("ElevationProfileLineGround: no dependencies");const{ground:t}=r;if(null==t)throw new Error("No ground configured in the view");const n=await t.queryElevation(e,o),s=i(e.spatialReference),l=i(t.layers.at(0).spatialReference);if(s!==l){const e=n.geometry;e.points=e.points.map(([e,r,t])=>[e,r,t===o.noDataValue?t:t*l/s])}return n}attach(e){return r([super.attach(e),n(()=>this._queryElevationDependencies,()=>this._onChange())])}};e([s({type:o,nonNullable:!0})],p.prototype,"color",void 0),e([s()],p.prototype,"viewVisualizationEnabled",void 0),e([s()],p.prototype,"available",null),e([s({readOnly:!0})],p.prototype,"minDemResolution",null),e([s()],p.prototype,"_queryElevationDependencies",null),e([s()],p.prototype,"_ground",null),e([s()],p.prototype,"_groundLayers",null),p=e([l("esri.widgets.ElevationProfile.ElevationProfileLineGround")],p);const d=p;export{d as default};
@@ -5,7 +5,7 @@ import type { SelectableViewUnion, SelectionOperationEvents, SelectionOperationT
5
5
  import type { SelectionToolConfig, SelectionToolOptions, SelectionToolbarState } from "./types.js";
6
6
 
7
7
  /** @internal */
8
- export interface SelectionToolbarViewModelProperties extends Partial<Pick<SelectionToolbarViewModel, "continuousSelectionEnabled" | "defaultLassoToolOptions" | "defaultOperationType" | "defaultPointToolOptions" | "defaultRectangleToolOptions" | "layerViewPreferenceEnabled" | "persistSelection" | "returnFeatureTitleFields" | "returnGeometry" | "selectionManager" | "selectOnComplete" | "sources" | "toolConfigs" | "view">> {}
8
+ export interface SelectionToolbarViewModelProperties extends Partial<Pick<SelectionToolbarViewModel, "continuousSelectionEnabled" | "defaultLassoToolOptions" | "defaultOperationType" | "defaultPointToolOptions" | "defaultPolygonToolOptions" | "defaultRectangleToolOptions" | "layerViewPreferenceEnabled" | "persistSelection" | "returnFeatureTitleFields" | "returnGeometry" | "selectionManager" | "selectOnComplete" | "sources" | "toolConfigs" | "view">> {}
9
9
 
10
10
  /**
11
11
  * Events emitted by SelectionToolbarViewModel.
@@ -22,7 +22,7 @@ export interface SelectionToolbarViewModelEvents {
22
22
  }
23
23
 
24
24
  /**
25
- * Manages interactive selection operations for rectangle, lasso, and custom selection tools.
25
+ * Manages interactive selection operations for various selection tools.
26
26
  *
27
27
  * @internal
28
28
  */
@@ -55,6 +55,12 @@ export default class SelectionToolbarViewModel extends EventedAccessor {
55
55
  * @internal
56
56
  */
57
57
  accessor defaultPointToolOptions: SelectionToolOptions;
58
+ /**
59
+ * Default configuration for the polygon tool.
60
+ *
61
+ * @internal
62
+ */
63
+ accessor defaultPolygonToolOptions: SelectionToolOptions;
58
64
  /**
59
65
  * Default configuration for the rectangle tool.
60
66
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{deprecatedProperty as t}from"../../../core/deprecate.js";import{EventedAccessor as o}from"../../../core/Evented.js";import{handlesGroup as i}from"../../../core/handleUtils.js";import s from"../../../core/Logger.js";import{removeMaybe as r}from"../../../core/maybe.js";import{watch as a}from"../../../core/reactiveUtils.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isKnowledgeGraphLayer as c,isLinkChartLayer as p}from"../../../layers/support/layerUtils.js";import{findLayerView as d}from"../../../views/draw/support/layerUtils.js";import u from"../../../views/selection/SelectionOperation.js";import{isSelectableLayerView2D as h}from"../../../views/support/layerViewUtils.js";import{isSelectableLayerView as v,isTableLayer as f}from"../../../views/support/selectionUtils.js";let y=class extends o{constructor(e){super(e),this._operationHandlesGroup=null,this.activeOperation=null,this.continuousSelectionEnabled=!1,this.defaultLassoToolOptions={createTool:"polygon",mode:"hybrid",toolName:"lasso"},this.defaultOperationType="add",this.defaultPointToolOptions={createTool:"point",toolName:"point"},this.defaultRectangleToolOptions={createTool:"rectangle",toolName:"rectangle"},this.layerViewPreferenceEnabled=!0,this.persistSelection=!0,this.selectionManager=null,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selectOnComplete=!0,this.sources=null,this.toolConfigs=[]}initialize(){this.addHandles([a(()=>this.effectiveSources,e=>{this.activeOperation&&(this.activeOperation.sources=e)}),a(()=>this.defaultOperationType,e=>{this.activeOperation&&(this.activeOperation.type=e)})])}destroy(){this.activeOperation?.cancel(),this.activeOperation?.destroy(),this._operationHandlesGroup=r(this._operationHandlesGroup)}get effectiveSelectionManager(){return this.selectionManager??this.view?.selectionManager}get effectiveSources(){const{layerViewPreferenceEnabled:e,sources:t,view:o}=this,i=t??this.effectiveSelectionManager?.sources;if(!i?.length)return[];const s=new Set,r="3d"===o?.type?v:h;return i.forEach(t=>{if(!f(t,o))if(r(t))s.add(t);else if(c(t)||p(t)){(t.layers||[]).forEach(t=>{const i=o?d(o,t):void 0,a=e&&r(i)?i:t;s.add(a)})}else if(e){const e=o?d(o,t):void 0;s.add(r(e)?e:t)}else s.add(t)}),Array.from(s)}get layers(){return t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources}set layers(e){t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources=e}get state(){return this.activeOperation?"active":this.view?.ready&&this.effectiveSources.length?"ready":"disabled"}activate(e){const{state:t}=this,o=e?.view||this.view,r=e?.sources||this.effectiveSources;if("disabled"===t||!o)return void s.getLogger(this).warn("Unable to start selection operation.");"active"===t&&this.cancel();const a=new CustomEvent("before-activate",{cancelable:!0,detail:{toolName:e?.toolName??null}});if(this.emit("before-activate",a),a.defaultPrevented)return;const n={type:this.defaultOperationType,persistSelection:this.persistSelection,returnFeatureTitleFields:this.returnFeatureTitleFields,returnGeometry:this.returnGeometry,selectOnComplete:this.selectOnComplete,selectionManager:this.effectiveSelectionManager,...e,sources:r,view:o},l=new u({...n});return this._operationHandlesGroup=i([l.on("selection-change",e=>this.emit("selection-change",e)),l.once("complete",e=>this._onOperationComplete(e,n))]),this._set("activeOperation",l),l}activateTool(e){this.cancel();const t=this._getToolOptions(e);if(t)return this.activate(t);s.getLogger(this).warn("Unable to activate tool: unable to determine options.")}cancel(){this.activeOperation?.cancel(),this._set("activeOperation",null)}toggleTool(e){const{activeOperation:t}=this;if(t){const o=t.toolName;if(this.cancel(),o===e)return}return this.activateTool(e)}_onOperationComplete(e,t){const o=this.activeOperation?.type??e.operationType;this._operationHandlesGroup=r(this._operationHandlesGroup),this.activeOperation?.destroy(),this._set("activeOperation",null),this.emit("complete",e),this.continuousSelectionEnabled&&!e.aborted&&this.activate({...t,type:o})}_getToolOptions(e){const t=this.toolConfigs.find(t=>t.toolName===e);return t||("lasso"===e?this.defaultLassoToolOptions:"point"===e?this.defaultPointToolOptions:"rectangle"===e?this.defaultRectangleToolOptions:void 0)}};e([n({readOnly:!0})],y.prototype,"activeOperation",void 0),e([n()],y.prototype,"continuousSelectionEnabled",void 0),e([n()],y.prototype,"defaultLassoToolOptions",void 0),e([n()],y.prototype,"defaultOperationType",void 0),e([n()],y.prototype,"defaultPointToolOptions",void 0),e([n()],y.prototype,"defaultRectangleToolOptions",void 0),e([n()],y.prototype,"effectiveSelectionManager",null),e([n()],y.prototype,"effectiveSources",null),e([n()],y.prototype,"layers",null),e([n()],y.prototype,"layerViewPreferenceEnabled",void 0),e([n()],y.prototype,"persistSelection",void 0),e([n()],y.prototype,"selectionManager",void 0),e([n()],y.prototype,"returnFeatureTitleFields",void 0),e([n()],y.prototype,"returnGeometry",void 0),e([n()],y.prototype,"selectOnComplete",void 0),e([n()],y.prototype,"sources",void 0),e([n({readOnly:!0})],y.prototype,"state",null),e([n()],y.prototype,"toolConfigs",void 0),e([n()],y.prototype,"view",void 0),y=e([l("esri.widgets.support.SelectionToolbar.SelectionToolbarViewModel")],y);const m=y;export{m as default};
2
+ import{__decorate as e}from"tslib";import{deprecatedProperty as t}from"../../../core/deprecate.js";import{EventedAccessor as o}from"../../../core/Evented.js";import{handlesGroup as i}from"../../../core/handleUtils.js";import s from"../../../core/Logger.js";import{removeMaybe as r}from"../../../core/maybe.js";import{watch as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isKnowledgeGraphLayer as p,isLinkChartLayer as c}from"../../../layers/support/layerUtils.js";import{findLayerView as d}from"../../../views/draw/support/layerUtils.js";import u from"../../../views/selection/SelectionOperation.js";import{isSelectableLayerView2D as h}from"../../../views/support/layerViewUtils.js";import{isSelectableLayerView as f,isTableLayer as v}from"../../../views/support/selectionUtils.js";let y=class extends o{constructor(e){super(e),this._operationHandlesGroup=null,this.activeOperation=null,this.continuousSelectionEnabled=!1,this.defaultLassoToolOptions={createTool:"polygon",mode:"hybrid",toolName:"lasso"},this.defaultOperationType="add",this.defaultPolygonToolOptions={createTool:"polygon",mode:"hybrid",toolName:"polygon"},this.defaultPointToolOptions={createTool:"point",toolName:"point"},this.defaultRectangleToolOptions={createTool:"rectangle",toolName:"rectangle"},this.layerViewPreferenceEnabled=!0,this.persistSelection=!0,this.selectionManager=null,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selectOnComplete=!0,this.sources=null,this.toolConfigs=[]}initialize(){this.addHandles([n(()=>this.effectiveSources,e=>{this.activeOperation&&(this.activeOperation.sources=e)}),n(()=>this.defaultOperationType,e=>{this.activeOperation&&(this.activeOperation.type=e)})])}destroy(){this.activeOperation?.cancel(),this.activeOperation?.destroy(),this._operationHandlesGroup=r(this._operationHandlesGroup)}get effectiveSelectionManager(){return this.selectionManager??this.view?.selectionManager}get effectiveSources(){const{layerViewPreferenceEnabled:e,sources:t,view:o}=this,i=t??this.effectiveSelectionManager?.sources;if(!i?.length)return[];const s=new Set,r="3d"===o?.type?f:h;return i.forEach(t=>{if(!v(t,o))if(r(t))s.add(t);else if(p(t)||c(t)){(t.layers||[]).forEach(t=>{const i=o?d(o,t):void 0,n=e&&r(i)?i:t;s.add(n)})}else if(e){const e=o?d(o,t):void 0;s.add(r(e)?e:t)}else s.add(t)}),Array.from(s)}get layers(){return t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources}set layers(e){t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources=e}get state(){return this.activeOperation?"active":this.view?.ready&&this.effectiveSources.length?"ready":"disabled"}activate(e){const{state:t}=this,o=e?.view||this.view,r=e?.sources||this.effectiveSources;if("disabled"===t||!o)return void s.getLogger(this).warn("Unable to start selection operation.");"active"===t&&this.cancel();const n=new CustomEvent("before-activate",{cancelable:!0,detail:{toolName:e?.toolName??null}});if(this.emit("before-activate",n),n.defaultPrevented)return;const a={type:this.defaultOperationType,persistSelection:this.persistSelection,returnFeatureTitleFields:this.returnFeatureTitleFields,returnGeometry:this.returnGeometry,selectOnComplete:this.selectOnComplete,selectionManager:this.effectiveSelectionManager,...e,sources:r,view:o},l=new u({...a});return this._operationHandlesGroup=i([l.on("selection-change",e=>this.emit("selection-change",e)),l.once("complete",e=>this._onOperationComplete(e,a))]),this._set("activeOperation",l),l}activateTool(e){this.cancel();const t=this._getToolOptions(e);if(t)return this.activate(t);s.getLogger(this).warn("Unable to activate tool: unable to determine options.")}cancel(){this.activeOperation?.cancel(),this._set("activeOperation",null)}toggleTool(e){const{activeOperation:t}=this;if(t){const o=t.toolName;if(this.cancel(),o===e)return}return this.activateTool(e)}_onOperationComplete(e,t){const o=this.activeOperation?.type??e.operationType;this._operationHandlesGroup=r(this._operationHandlesGroup),this.activeOperation?.destroy(),this._set("activeOperation",null),this.emit("complete",e),this.continuousSelectionEnabled&&!e.aborted&&this.activate({...t,type:o})}_getToolOptions(e){const t=this.toolConfigs.find(t=>t.toolName===e);return t||("lasso"===e?this.defaultLassoToolOptions:"point"===e?this.defaultPointToolOptions:"polygon"===e?this.defaultPolygonToolOptions:"rectangle"===e?this.defaultRectangleToolOptions:void 0)}};e([a({readOnly:!0})],y.prototype,"activeOperation",void 0),e([a()],y.prototype,"continuousSelectionEnabled",void 0),e([a()],y.prototype,"defaultLassoToolOptions",void 0),e([a()],y.prototype,"defaultOperationType",void 0),e([a()],y.prototype,"defaultPolygonToolOptions",void 0),e([a()],y.prototype,"defaultPointToolOptions",void 0),e([a()],y.prototype,"defaultRectangleToolOptions",void 0),e([a()],y.prototype,"effectiveSelectionManager",null),e([a()],y.prototype,"effectiveSources",null),e([a()],y.prototype,"layers",null),e([a()],y.prototype,"layerViewPreferenceEnabled",void 0),e([a()],y.prototype,"persistSelection",void 0),e([a()],y.prototype,"selectionManager",void 0),e([a()],y.prototype,"returnFeatureTitleFields",void 0),e([a()],y.prototype,"returnGeometry",void 0),e([a()],y.prototype,"selectOnComplete",void 0),e([a()],y.prototype,"sources",void 0),e([a({readOnly:!0})],y.prototype,"state",null),e([a()],y.prototype,"toolConfigs",void 0),e([a()],y.prototype,"view",void 0),y=e([l("esri.widgets.support.SelectionToolbar.SelectionToolbarViewModel")],y);const m=y;export{m as default};
@@ -1,7 +1,7 @@
1
1
  import type Accessor from "../../../core/Accessor.js";
2
2
 
3
3
  /** @internal */
4
- export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "chip" | "lassoTool" | "operationTypeControls" | "pan" | "pointTool" | "rectangleTool">> {}
4
+ export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "chip" | "lassoTool" | "operationTypeControls" | "pan" | "pointTool" | "polygonTool" | "rectangleTool">> {}
5
5
 
6
6
  /**
7
7
  * Used to control visible elements of the selection toolbar widget.
@@ -50,6 +50,13 @@ export default class VisibleElements extends Accessor {
50
50
  * @internal
51
51
  */
52
52
  accessor pointTool: boolean;
53
+ /**
54
+ * Determines if the selection toolbar should display the polygon tool.
55
+ *
56
+ * @default false
57
+ * @internal
58
+ */
59
+ accessor polygonTool: boolean;
53
60
  /**
54
61
  * Determines if the selection toolbar should display the rectangle tool.
55
62
  *