@arcgis/core 5.2.0-next.148 → 5.2.0-next.149

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 (133) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/09b9a886363bc1197785.js +1 -0
  3. package/assets/esri/core/workers/chunks/0ad0484ffcbe4ad21bd3.js +1 -0
  4. package/assets/esri/core/workers/chunks/{52c25809edf7ac008a52.js → 12a7997a40c77f5c9160.js} +1 -1
  5. package/assets/esri/core/workers/chunks/18787aa685524b958561.js +1 -0
  6. package/assets/esri/core/workers/chunks/{776ae25a34352d3468bc.js → 19743dedaa40446259ec.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{27a425d87c57b91489b3.js → 21f45a47708e6e43147f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/2c626f525f3483c03477.js +1 -0
  9. package/assets/esri/core/workers/chunks/{7a05b18f655c1167ce0a.js → 2ef5237e4c876d6a4ee0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{0a078721c7e0e24027f0.js → 320e5942a098dd104366.js} +1 -1
  11. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +1 -0
  12. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +1 -0
  13. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +1 -0
  14. package/assets/esri/core/workers/chunks/{24cc7b6b5e307a89cdd5.js → 50036a323c2e7f155311.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5116b569a8dbda4910c8.js +1 -0
  16. package/assets/esri/core/workers/chunks/{b2737120c5999b2f3909.js → 55dcbf296d8d0092e473.js} +1 -1
  17. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +1 -0
  18. package/assets/esri/core/workers/chunks/6b04285726b803b82564.js +1 -0
  19. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +1 -0
  20. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +1 -0
  21. package/assets/esri/core/workers/chunks/7572c2bc5062e66f6330.js +1 -0
  22. package/assets/esri/core/workers/chunks/7d212c415f2709037408.js +1 -0
  23. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +1 -0
  24. package/assets/esri/core/workers/chunks/8414ffd937c1099e0bbc.js +1 -0
  25. package/assets/esri/core/workers/chunks/9401cc22373566e1171e.js +1 -0
  26. package/assets/esri/core/workers/chunks/97d6ef9e34a43ad2e556.js +1 -0
  27. package/assets/esri/core/workers/chunks/{c76c42c74eedd43263d3.js → 9dd1fc56eb1ea6eb705e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/a07cb6a2f5b66d4e9f15.js +1 -0
  29. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +1 -0
  30. package/assets/esri/core/workers/chunks/a7f3576208f295b670d6.js +1 -0
  31. package/assets/esri/core/workers/chunks/a80e49acc827dbf3b524.js +1 -0
  32. package/assets/esri/core/workers/chunks/aeaaff7a4b1a99540f52.js +1 -0
  33. package/assets/esri/core/workers/chunks/b19b6102ed2d6f67b43b.js +1 -0
  34. package/assets/esri/core/workers/chunks/b1b4066e8d1c0c9656e5.js +1 -0
  35. package/assets/esri/core/workers/chunks/b4334713bacdfe40ce3d.js +1 -0
  36. package/assets/esri/core/workers/chunks/bbec9d2e3b75a5c59681.js +1 -0
  37. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +1 -0
  38. package/assets/esri/core/workers/chunks/c8d178a0c82fffd7fed5.js +1 -0
  39. package/assets/esri/core/workers/chunks/c8d6bb5cca49926a0214.js +1 -0
  40. package/assets/esri/core/workers/chunks/cde4b044e013b9e41591.js +1 -0
  41. package/assets/esri/core/workers/chunks/{7a4f1484b119ebafc2e7.js → d2347d6aa1c57fd57029.js} +1 -1
  42. package/assets/esri/core/workers/chunks/dca35dbe427605ef6fcc.js +1 -0
  43. package/assets/esri/core/workers/chunks/f1df76f098a3cc924832.js +1 -0
  44. package/assets/esri/core/workers/chunks/f4f9d08b2df856e3b694.js +1 -0
  45. package/assets/esri/core/workers/chunks/f8a83d447b7aef051876.js +1 -0
  46. package/assets/esri/core/workers/chunks/fc44227c1756f65b95df.js +1 -0
  47. package/config.js +1 -1
  48. package/core/Loadable.js +1 -1
  49. package/geometry/HeightModelInfo.js +1 -1
  50. package/kernel.js +1 -1
  51. package/layers/BaseDynamicLayer.d.ts +1 -0
  52. package/layers/BaseElevationLayer.d.ts +2 -0
  53. package/layers/BaseTileLayer.d.ts +12 -9
  54. package/layers/CSVLayer.d.ts +0 -15
  55. package/layers/FeatureLayer.d.ts +2 -15
  56. package/layers/GeoJSONLayer.d.ts +0 -52
  57. package/layers/GeoRSSLayer.d.ts +0 -44
  58. package/layers/ParquetLayer.d.ts +81 -3
  59. package/layers/ParquetLayer.js +1 -1
  60. package/layers/VectorTileLayer.d.ts +2 -12
  61. package/layers/mixins/RefreshableLayer.d.ts +1 -3
  62. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  63. package/layers/support/layersLoader.js +1 -1
  64. package/package.json +2 -2
  65. package/popup/FeaturesModel.d.ts +1 -1
  66. package/popup/FeaturesModel.js +1 -1
  67. package/portal/support/portalLayers.js +1 -1
  68. package/renderers/VectorFieldRenderer.d.ts +4 -4
  69. package/smartMapping/renderers/color.js +1 -1
  70. package/smartMapping/renderers/dotDensity.js +1 -1
  71. package/smartMapping/renderers/heatmap.js +1 -1
  72. package/smartMapping/renderers/pieChart.js +1 -1
  73. package/smartMapping/renderers/type.js +1 -1
  74. package/smartMapping/statistics/heatmapStatistics.js +1 -1
  75. package/smartMapping/statistics/histogram.js +1 -1
  76. package/smartMapping/statistics/summaryStatistics.js +1 -1
  77. package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
  78. package/smartMapping/statistics/uniqueValues.js +1 -1
  79. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  80. package/smartMapping/types.d.ts +3 -1
  81. package/views/3d/terrain/TerrainData.js +1 -1
  82. package/views/3d/terrain/terrainUtils.js +1 -1
  83. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  84. package/views/DOMContainer.d.ts +27 -9
  85. package/views/DOMContainer.js +1 -1
  86. package/views/PopupView.d.ts +6 -0
  87. package/views/VideoView.d.ts +27 -9
  88. package/views/View.d.ts +16 -7
  89. package/views/View.js +1 -1
  90. package/views/draw/support/InteractiveHandle.js +1 -1
  91. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  92. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  93. package/views/layers/FeatureLikeLayerView.d.ts +1 -2
  94. package/views/layers/ParquetLayerView.d.ts +15 -0
  95. package/assets/esri/core/workers/chunks/05963f57cbe5a5249496.js +0 -1
  96. package/assets/esri/core/workers/chunks/131e89663014bc76c4ee.js +0 -1
  97. package/assets/esri/core/workers/chunks/14a3808427deaaa85bf2.js +0 -1
  98. package/assets/esri/core/workers/chunks/16053ce50642c5ffbfa9.js +0 -1
  99. package/assets/esri/core/workers/chunks/19689c66776b39cec234.js +0 -1
  100. package/assets/esri/core/workers/chunks/1a6027f08893aba9e677.js +0 -1
  101. package/assets/esri/core/workers/chunks/1b3f59fcad6e14c4d0e0.js +0 -1
  102. package/assets/esri/core/workers/chunks/20458fffda7692c78135.js +0 -1
  103. package/assets/esri/core/workers/chunks/2164fcaced72b0fda31f.js +0 -1
  104. package/assets/esri/core/workers/chunks/219d0935ce281902a49f.js +0 -1
  105. package/assets/esri/core/workers/chunks/2416518db4a0117541a8.js +0 -1
  106. package/assets/esri/core/workers/chunks/25b0885d3bc190b28c04.js +0 -1
  107. package/assets/esri/core/workers/chunks/2e75df54852d65e71330.js +0 -1
  108. package/assets/esri/core/workers/chunks/39d1d2fbe94afcd0a590.js +0 -1
  109. package/assets/esri/core/workers/chunks/3e9f056e4d1f0d067fc6.js +0 -1
  110. package/assets/esri/core/workers/chunks/43321f244effd3d67069.js +0 -1
  111. package/assets/esri/core/workers/chunks/47e6b5631a625298db5b.js +0 -1
  112. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +0 -1
  113. package/assets/esri/core/workers/chunks/5ea8809b6519c05ad9f6.js +0 -1
  114. package/assets/esri/core/workers/chunks/5f0c06f59121e09091f7.js +0 -1
  115. package/assets/esri/core/workers/chunks/62795a1573cbaa4b8e7a.js +0 -1
  116. package/assets/esri/core/workers/chunks/70ee81ba22badbbf045c.js +0 -1
  117. package/assets/esri/core/workers/chunks/794e5a67a88cb10c1a19.js +0 -1
  118. package/assets/esri/core/workers/chunks/841f67baf6a1634ada48.js +0 -1
  119. package/assets/esri/core/workers/chunks/8602b3587d4bdd9cc9f5.js +0 -1
  120. package/assets/esri/core/workers/chunks/898f43feeec74acde1ec.js +0 -1
  121. package/assets/esri/core/workers/chunks/8ef802ef8d108ae2e473.js +0 -1
  122. package/assets/esri/core/workers/chunks/94c5f3bc07fe516dafbe.js +0 -1
  123. package/assets/esri/core/workers/chunks/a101b89c18488f213d80.js +0 -1
  124. package/assets/esri/core/workers/chunks/a337ca943862b30b978d.js +0 -1
  125. package/assets/esri/core/workers/chunks/ac03976b8450331aa31e.js +0 -1
  126. package/assets/esri/core/workers/chunks/b0fd7cd5fc9526d30ddc.js +0 -1
  127. package/assets/esri/core/workers/chunks/b3e812c3a06b486f05d2.js +0 -1
  128. package/assets/esri/core/workers/chunks/ba48045a81acc4cda927.js +0 -1
  129. package/assets/esri/core/workers/chunks/c7699edd14497d174445.js +0 -1
  130. package/assets/esri/core/workers/chunks/dbcac8c1a76d4a9db13d.js +0 -1
  131. package/assets/esri/core/workers/chunks/de8d7f11f5a078c01b83.js +0 -1
  132. package/assets/esri/core/workers/chunks/f05de08e194a3f9b96f2.js +0 -1
  133. package/assets/esri/core/workers/chunks/f2b69bd704db62915a6b.js +0 -1
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../core/Collection.js";import{isEarth as t}from"../../../geometry/ellipsoidUtils.js";import{isCGCS2000 as n}from"../../../geometry/support/spatialReferenceUtils.js";import{getTileMaxtrixSetFromActiveLayer as r}from"../../../layers/support/layerUtils.js";import{isRasterTile as i,isCreateBitmapResult as a,isTileTexture as o,isVectorTile as s}from"./TerrainData.js";import{t as c}from"../../../chunks/terrainUtilsPlanar.js";import{t as l}from"../../../chunks/terrainUtilsSpherical.js";const u={1:l,2:c};function d(e,t){e||console.warn(`Terrain: `+t)}let f=!1,p=!1;function m(e){p=e,f||=e}function h(e){f=e}function g(e,t){if(f&&!e){let e=Error().stack?.slice(5);throw console.warn(`Terrain internal: `+(t??``)+` at `+e),Error(`Assertion failed`+(t?`: `+t:``))}}function _(e){return e?.type===`imagery-tile`||e?.type===`wcs`}function v(e){return e?.type===`imagery-tile-3d`}function y(e){return e?.type===`tile-3d`}function b(e){return e?.type===`vector-tile-3d`}function x(e){return e?.type===`wmts-3d`}function S(e){return e?.type===`elevation-3d`}function C(e){return e?.type===`group`}function w(e){return e&&(y(e)||x(e)||v(e)||b(e))}function T(e){return e&&(y(e)||v(e)||b(e)||x(e))}function E(e){return T(e)||S(e)}function D(e){return i(e?.sourceLayerInfo?.data)}function O(e){return j(e?.sourceLayerInfo)||!!e?.isVTLBackground}function k(e){return o(e?.sourceLayerInfo?.data)}function A(e){let t=e?.sourceLayerInfo?.data;return a(t)}function j(e){return s(e?.data)}function M(e){return e!=null&&`release`in e&&e.release(),null}function N(e,t,n,r,i){return u[r].checkIfTileInfoSupportedForViewSR(e,n,t,i)}function P(e,t,n){let r=null,i=null;if(e?.type===`wmts`){let a=F(e,t,n);r=a.tileInfo,i=a.fullExtent}else{i=_(e)?e.getCompatibleFullExtent(t):e.fullExtent;let a=n===2;r=_(e)?e.getCompatibleTileInfo(t,i,a):e?.type===`vector-tile`?a&&!I(t)||L.force512VTL?e.tileInfo:e.tileInfo.getCompatibleForVTL(256):e.tileInfo}let a=`tilemapCache`in e?e.tilemapCache?.effectiveMaxLOD:void 0;return r!=null&&i!=null&&N(r,i,t,n,a)==null?{tileInfo:r,fullExtent:i}:null}function F(t,n,i){let a=r(t);if(a!=null){if(e.isCollection(a)){let e=a.find(e=>N(e.tileInfo,e.fullExtent,n,i)==null);if(e)return{tileInfo:e.tileInfo,fullExtent:e.fullExtent}}else return{tileInfo:a.tileInfo,fullExtent:a.fullExtent}}return{tileInfo:null,fullExtent:null}}function I(e){return e.isWGS84||e.isWebMercator||n(e)||!t(e)}const L={force512VTL:!1};function R(e){return`[`+e[0]+`,`+e[1]+`,`+e[2]+`]`}function z(e){return`(`+e[0]+`,`+e[1]+`,`+e[2]+`)`}function B(e,t,n=Z){return Math.abs(e-t)<n}function V(e){return e===1?5:e===7?3:e===5?1:7}function H(e){return e===0?4:e===2?6:e===4?0:2}function U(e){return e===7||e===5}function W(e){return e===7||e===1}function G(e){return e===7||e===6||e===5}function K(e){return e===1||e===2||e===3}function q(e){return e===3||e===4||e===5}function J(e){return e===1||e===0||e===7}const Y=[0,2,4,6],X=[1,3,5,7],Z=1e-5;export{B as almostEquals,N as checkIfTileInfoSupportedForView,h as enableInternalTerrainChecks,f as enableTerrainInternalChecks,m as enableTerrainWaterproofChecks,p as enableWaterproofTests,Z as eps,F as getTileInfoAndExtentFromWMTSLayer,P as getTiledLayerInfo,g as internalAssert,w as isBlendableLayerView,K as isEast,S as isElevationLayerView,C as isGroupLayerView,A as isImageSourceRenderInfo,v as isImageryTileLayerView,D as isImageryTileRenderInfo,T as isMapTileLayerView,J as isNorth,W as isNorthCorner,_ as isProjectableRasterLayer,q as isSouth,E as isSurfaceLayerView,k as isTextureTileRenderInfo,y as isTileLayerView,b as isVectorTileLayerView,j as isVectorTilePerLayerInfo,O as isVectorTileRenderInfo,x as isWMTSLayerView,G as isWest,U as isWestCorner,R as lij2s,X as neighborCornerIndices,Y as neighborEdgeIndices,V as oppositeCorner,H as oppositeEdge,M as releaseTerrainData,L as test,z as v32s,I as vtlAssumes256PixelSizeAsDefault,d as weakAssert};
2
+ import e from"../../../core/Collection.js";import{isEarth as t}from"../../../geometry/ellipsoidUtils.js";import{isCGCS2000 as n}from"../../../geometry/support/spatialReferenceUtils.js";import{getTileMaxtrixSetFromActiveLayer as r}from"../../../layers/support/layerUtils.js";import{isRasterTile as i,isCreateBitmapResult as a,isTileTexture as o,isVectorTile as s}from"./TerrainData.js";import{t as c}from"../../../chunks/terrainUtilsPlanar.js";import{t as l}from"../../../chunks/terrainUtilsSpherical.js";const u={1:l,2:c};function d(e,t){e||console.warn(`Terrain: `+t)}let f=!1,p=!1;function m(e){p=e,f||=e}function h(e){f=e}function g(e,t){if(f&&!e){let e=Error().stack?.slice(5);throw console.warn(`Terrain internal: `+(t??``)+` at `+e),Error(`Assertion failed`+(t?`: `+t:``))}}function _(e){return e?.type===`imagery-tile`||e?.type===`wcs`}function v(e){return e?.type===`imagery-tile-3d`}function y(e){return e?.type===`tile-3d`}function b(e){return e?.type===`vector-tile-3d`}function x(e){return e?.type===`wmts-3d`}function S(e){return e?.type===`elevation-3d`}function C(e){return e?.type===`group`}function w(e){return e&&(y(e)||x(e)||v(e)||b(e))}function T(e){return e&&(y(e)||v(e)||b(e)||x(e))}function E(e){return T(e)||S(e)}function D(e){return i(e?.sourceLayerInfo?.data)}function O(e){return e?.sourceLayerInfo?.data!=null&&j(e.sourceLayerInfo)||!!e?.isVTLBackground}function k(e){return o(e?.sourceLayerInfo?.data)}function A(e){let t=e?.sourceLayerInfo?.data;return a(t)}function j(e){return s(e?.data)}function M(e){return e!=null&&`release`in e&&e.release(),null}function N(e,t,n,r,i){return u[r].checkIfTileInfoSupportedForViewSR(e,n,t,i)}function P(e,t,n){let r=null,i=null;if(e?.type===`wmts`){let a=F(e,t,n);r=a.tileInfo,i=a.fullExtent}else{i=_(e)?e.getCompatibleFullExtent(t):e.fullExtent;let a=n===2;r=_(e)?e.getCompatibleTileInfo(t,i,a):e?.type===`vector-tile`?a&&!I(t)||L.force512VTL?e.tileInfo:e.tileInfo.getCompatibleForVTL(256):e.tileInfo}let a=`tilemapCache`in e?e.tilemapCache?.effectiveMaxLOD:void 0;return r!=null&&i!=null&&N(r,i,t,n,a)==null?{tileInfo:r,fullExtent:i}:null}function F(t,n,i){let a=r(t);if(a!=null){if(e.isCollection(a)){let e=a.find(e=>N(e.tileInfo,e.fullExtent,n,i)==null);if(e)return{tileInfo:e.tileInfo,fullExtent:e.fullExtent}}else return{tileInfo:a.tileInfo,fullExtent:a.fullExtent}}return{tileInfo:null,fullExtent:null}}function I(e){return e.isWGS84||e.isWebMercator||n(e)||!t(e)}const L={force512VTL:!1};function R(e){return`[`+e[0]+`,`+e[1]+`,`+e[2]+`]`}function z(e){return`(`+e[0]+`,`+e[1]+`,`+e[2]+`)`}function B(e,t,n=Z){return Math.abs(e-t)<n}function V(e){return e===1?5:e===7?3:e===5?1:7}function H(e){return e===0?4:e===2?6:e===4?0:2}function U(e){return e===7||e===5}function W(e){return e===7||e===1}function G(e){return e===7||e===6||e===5}function K(e){return e===1||e===2||e===3}function q(e){return e===3||e===4||e===5}function J(e){return e===1||e===0||e===7}const Y=[0,2,4,6],X=[1,3,5,7],Z=1e-5;export{B as almostEquals,N as checkIfTileInfoSupportedForView,h as enableInternalTerrainChecks,f as enableTerrainInternalChecks,m as enableTerrainWaterproofChecks,p as enableWaterproofTests,Z as eps,F as getTileInfoAndExtentFromWMTSLayer,P as getTiledLayerInfo,g as internalAssert,w as isBlendableLayerView,K as isEast,S as isElevationLayerView,C as isGroupLayerView,A as isImageSourceRenderInfo,v as isImageryTileLayerView,D as isImageryTileRenderInfo,T as isMapTileLayerView,J as isNorth,W as isNorthCorner,_ as isProjectableRasterLayer,q as isSouth,E as isSurfaceLayerView,k as isTextureTileRenderInfo,y as isTileLayerView,b as isVectorTileLayerView,j as isVectorTilePerLayerInfo,O as isVectorTileRenderInfo,x as isWMTSLayerView,G as isWest,U as isWestCorner,R as lij2s,X as neighborCornerIndices,Y as neighborEdgeIndices,V as oppositeCorner,H as oppositeEdge,M as releaseTerrainData,L as test,z as v32s,I as vtlAssumes256PixelSizeAsDefault,d as weakAssert};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as o}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as s}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as c}from"../lighting/SceneLighting.js";class l{constructor(e,t){this.width=e,this.height=t}}class u{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.slicePlane=null,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.globalIlluminationDirectFactor=.8,this.globalIlluminationAmbientFactor=1,this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new c,this._newLighting=new c,this._fadedLighting=new c,this._lighting=this._newLighting,this.screenSpaceReflections=new s,this.reprojection=new o,this.highlights=[],this.highlightMixOrigin=n(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<5e5}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{u as BindParameters,l as ViewportSize};
2
+ import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as o}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as s}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as c}from"../lighting/SceneLighting.js";class l{constructor(e,t){this.width=e,this.height=t}}class u{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.slicePlane=null,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.globalIlluminationDirectFactor=.55,this.globalIlluminationAmbientFactor=.85,this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new c,this._newLighting=new c,this._fadedLighting=new c,this._lighting=this._newLighting,this.screenSpaceReflections=new s,this.reprojection=new o,this.highlights=[],this.highlightMixOrigin=n(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<5e5}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{u as BindParameters,l as ViewportSize};
@@ -20,15 +20,24 @@ export interface DOMContainerProperties extends Partial<Pick<DOMContainer, "aria
20
20
  */
21
21
  container?: HTMLDivElement | string | null;
22
22
  /**
23
- * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
24
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
23
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
24
+ * this only when they handle focus-region selection. When false, the shortcut does not change
25
+ * focus-region visibility.
26
+ *
27
+ * @default false
28
+ * @since 5.2
29
+ */
30
+ focusRegionShortcutEnabled?: boolean;
31
+ /**
32
+ * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
33
+ * When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
25
34
  *
26
35
  * @default false
27
36
  * @since 5.2
28
37
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
29
38
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
30
39
  */
31
- focusRegionEnabled?: boolean;
40
+ focusRegionVisible?: boolean;
32
41
  /**
33
42
  * Exposes the default widgets available in the view and allows you to toggle them on
34
43
  * and off. See [DefaultUI](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/) for more details.
@@ -117,31 +126,40 @@ export abstract class DOMContainer {
117
126
  */
118
127
  get focused(): boolean;
119
128
  /**
120
- * The screen rectangle of the active focus region, or `null` when [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
129
+ * The screen rectangle of the active focus region, or `null` when [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) is `false`.
121
130
  * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
122
131
  *
123
132
  * | Action | Keyboard Shortcut / Property |
124
133
  * |--------|----------------------------|
125
- * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) property to `true` or `false`. |
134
+ * | Enable or disable focus region | When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view is in focus. Alternatively, set [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) to `true` or `false`. |
126
135
  * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
127
136
  *
128
137
  * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
129
138
  *
130
139
  * @since 5.2
131
- * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled)
140
+ * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible)
132
141
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
133
142
  */
134
143
  get focusRegion(): ScreenRect | null;
135
144
  /**
136
- * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
137
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
145
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
146
+ * this only when they handle focus-region selection. When false, the shortcut does not change
147
+ * focus-region visibility.
148
+ *
149
+ * @default false
150
+ * @since 5.2
151
+ */
152
+ accessor focusRegionShortcutEnabled: boolean;
153
+ /**
154
+ * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
155
+ * When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
138
156
  *
139
157
  * @default false
140
158
  * @since 5.2
141
159
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
142
160
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
143
161
  */
144
- accessor focusRegionEnabled: boolean;
162
+ accessor focusRegionVisible: boolean;
145
163
  /**
146
164
  * The height of the view in pixels read from the view container element.
147
165
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{byId as t,reparent as n}from"../core/domUtils.js";import{on as r}from"../core/events.js";import{makeHandle as i}from"../core/handleUtils.js";import a from"../core/Logger.js";import{destroyMaybe as o,removeMaybe as s}from"../core/maybe.js";import{watch as c,initial as l,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as f,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as m}from"./Attribution.js";import h from"./overlay/FocusRegionOverlayItem.js";import g from"./overlay/ViewOverlay.js";const _=[0,0];function v(e){let t=(e.ownerDocument||window.document).defaultView,n=e.getBoundingClientRect();return _[0]=n.left+(t?.pageXOffset??0),_[1]=n.top+(t?.pageYOffset??0),_}function y(e){e&&(e.textContent=``,e.parentNode&&e.parentNode.removeChild(e))}const b=process.env.NODE_ENV===`test`,x=b?0:16,S=b?0:750,C=b?0:512,w={left:0,top:0,right:0,bottom:0},T={toggle:`KeyO`,resizeLarger:`ArrowUp`,resizeSmaller:`ArrowDown`,select:new Set([`Enter`,`Space`])},E=_=>{let b=_,E=class extends b{constructor(...e){super(...e),this._freqInfo={freq:x,time:S},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new h,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([c(()=>[this.focusRegionEnabled,this.overlay,this.ready],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled&&this.ready),{initial:!0}),c(()=>this.cursor,e=>{let{surface:t}=this;t&&t.setAttribute(`data-cursor`,e)}),c(()=>this.navigating,e=>{let{surface:t}=this;t&&t.setAttribute(`data-navigating`,e.toString())}),c(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),c(()=>{let{left:e,top:t,right:n,bottom:r}=this.padding??w;return[this.width,this.height,e,t,n,r]},([e,t,n,r,i,a])=>{let{_focusRegionOverlayItem:o}=this;o.backgroundHeight=t,o.backgroundWidth=e,o.padding={left:n,top:r,right:i,bottom:a},o.updateBoxSize()})])}initialize(){let e=this;this.addHandles([c(()=>this.ui,(e,t)=>this._handleUIChange(e,t),l),e.on(`focus`,()=>this.notifyChange(`focused`)),e.on(`blur`,()=>this.notifyChange(`focused`)),e.on(`key-down`,t=>{let{shiftKey:n,altKey:r,code:i,defaultPrevented:a}=t.native,{toggle:o,resizeLarger:s,resizeSmaller:c,select:l}=T,u=this.focusRegionEnabled&&n&&r&&(i===s||i===c);if(!t.repeat||u){if(!a&&n&&r&&i===o){this._toggleFocusRegion(),t.preventDefault();return}if(!a&&u){let{_focusRegionOverlayItem:e}=this;e.resizeBoxSize(i===s?50:-50),t.preventDefault(),t.native.stopPropagation(),t.stopPropagation();return}if(!a&&this.focusRegionEnabled&&l.has(i)){this._selectFocusRegion(t,e);return}}})])}destroy(){this.destroyed||(this.focusRegionEnabled=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get(`container`)??null}set container(e){let r=this._get(`container`),i=t(e);if(!i&&typeof e==`string`&&a.getLogger(this).error(`#container`,`element with id '${e}' not found`),r===i)return;if(this._stopMeasuring(),this.removeHandles(`container`),r&&(r.classList.remove(`esri-view`),this._overlayRenderTaskHandle&&=(this._overlayRenderTaskHandle.remove(),null),this.overlay&&(this.overlay.destroy(),this._set(`overlay`,null)),this._attribution=o(this._attribution),this.root&&(y(this.root),this._set(`root`,null)),this.userContent&&(n(this.userContent,r),y(this.userContent),this._set(`userContent`,null))),!i){this._set(`width`,0),this._set(`height`,0),this._set(`position`,null),this._set(`suspended`,!0),this._set(`surface`,null),this._set(`container`,null);return}i.classList.add(`esri-view`);let f=document.createElement(`div`);f.className=`esri-view-user-storage`,n(i,f),i.appendChild(f),this._set(`userContent`,f);let p=document.createElement(`div`);p.className=`esri-view-root`,i.insertBefore(p,i.firstChild),this._set(`root`,p);let h=document.createElement(`div`);h.className=`esri-view-surface`,h.setAttribute(`role`,`application`),h.tabIndex=0,p.appendChild(h),this._set(`surface`,h);let _=new g;p.appendChild(_.surface),this._set(`overlay`,_),this._syncFocusRegionOverlayItemVisibility(!1),this.addHandles(c(()=>_.needsRender,e=>{this._overlayRenderTaskHandle=e&&!this._overlayRenderTaskHandle?d({render:()=>this.overlay?.render()}):s(this._overlayRenderTaskHandle)},l),`container`),this.addHandles([c(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:e,items:t,mode:n})=>{if(!e){this._attribution=o(this._attribution);return}this._attribution||=new m({attributionItems:this.attributionItems,mode:this.attributionMode}),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=t,this._attribution.mode=n},u)],`container`),this.forceDOMReadyCycle(),this._set(`container`,i),this._startMeasuring()}get focused(){let e=document.activeElement===this.surface;return document.hasFocus()&&e}get focusRegion(){return this.focusRegionEnabled?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get(`ui`)}set ui(e){let t=this._get(`ui`);t!==e&&t?.destroy(),this._set(`ui`,e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,n){let r=this.position;return e-=r?r[0]:0,t-=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}containerToPage(e,t,n){let r=this.position;return e+=r?r[0]:0,t+=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}_updateAria(){let{surface:e,aria:t}=this;e&&(e.ariaLabelledByElements=t?.labelledByElements??null,e.ariaDescribedByElements=t?.describedByElements??null,e.ariaLabel=t?.label??null,e.ariaDescription=t?.description??null)}_selectFocusRegion(e,t){let n=this._makeFocusRegionSelectEvent(e);t.emit(`focus-region-select`,n),e.preventDefault()}_makeFocusRegionSelectEvent(e){let t={type:`focus-region-select`,native:e.native,defaultPrevented:!1,preventDefault:()=>{t.defaultPrevented=!0},stopPropagation:()=>{e.stopPropagation()}};return t}_toggleFocusRegion(){this.focusRegionEnabled=!this.focusRegionEnabled}_updateFocusRegionOverlayItem(){let{_focusRegionOverlayItem:e}=this;e.backgroundHeight=this.height,e.backgroundWidth=this.width,e.padding=this.padding??w,e.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(e){let{_focusRegionOverlayItem:t,overlay:n}=this,r=e;t.visible=r,n&&(n.removeItem(t),r&&(this._updateFocusRegionOverlayItem(),n.addItem(t)))}_handleUIChange(e,t){this.removeHandles(`ui`),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(c(()=>this.root,t=>{if(!t)e.container=null;else{let n=document.createElement(`div`);t.insertBefore(n,this._attribution?.surface??null),e.container=n}},l),`ui`)),this._set(`ui`,e)}_stopMeasuring(){this.removeHandles(`measuring`),this._get(`resizing`)&&this._set(`resizing`,!1)}_startMeasuring(){let e=this._freqInfo;e.freq=x,e.time=S;let t=d({prepare:e=>{let n=this._measure(),r=this._freqInfo;r.time+=e.deltaTime,n&&(r.freq=x,this._get(`resizing`)||this._set(`resizing`,!0)),!(r.time<r.freq)&&(r.time=0,r.freq=this._position()||n?x:Math.min(S,r.freq*2),!n&&r.freq>=C&&(t.pause(),this._get(`resizing`)&&this._set(`resizing`,!1)))}}),n=new ResizeObserver(n=>{e.freq=x,e.time=S,t.resume()});this.container!=null&&n.observe(this.container);let a=i(()=>n.disconnect());this.addHandles([r(window,`resize`,()=>{e.freq=x,e.time=S,t.resume()}),a,t],`measuring`),this._measure(),this._position()}_measure(){let e=this.container,t=e?e.clientWidth:0,n=e?e.clientHeight:0;if(t===0||n===0)return this.suspended||this._set(`suspended`,!0),!1;let r=this.width,i=this.height;return t===r&&n===i?(this.suspended&&this._set(`suspended`,!1),!1):(this._set(`width`,t),this._set(`height`,n),this.suspended&&this._set(`suspended`,!1),this.emit(`resize`,{oldWidth:r,oldHeight:i,width:t,height:n}),!0)}_position(){let e=this.container,t=this.position,n=e&&v(e);return n&&(!t||n[0]!==t[0]||n[1]!==t[1])?(this._set(`position`,[n[0],n[1]]),!0):!1}forceDOMReadyCycle(){}};return e([f()],E.prototype,`_attribution`,void 0),e([f()],E.prototype,`aria`,void 0),e([f()],E.prototype,`attributionHeight`,null),e([f()],E.prototype,`attributionMode`,void 0),e([f()],E.prototype,`container`,null),e([f({readOnly:!0})],E.prototype,`focused`,null),e([f({readOnly:!0})],E.prototype,`height`,void 0),e([f()],E.prototype,`focusRegionEnabled`,void 0),e([f()],E.prototype,`focusRegion`,null),e([f()],E.prototype,`messagesCommon`,void 0),e([f({type:g})],E.prototype,`overlay`,void 0),e([f({readOnly:!0})],E.prototype,`position`,void 0),e([f({readOnly:!0})],E.prototype,`resizing`,void 0),e([f({readOnly:!0})],E.prototype,`root`,void 0),e([f({value:null,readOnly:!0})],E.prototype,`size`,null),e([f({readOnly:!0})],E.prototype,`surface`,void 0),e([f({readOnly:!0})],E.prototype,`suspended`,void 0),e([f({nonNullable:!0})],E.prototype,`ui`,null),e([f({readOnly:!0})],E.prototype,`userContent`,void 0),e([f({readOnly:!0})],E.prototype,`width`,void 0),e([f()],E.prototype,`widthBreakpoint`,void 0),E=e([p(`esri.views.DOMContainer`)],E),E};export{E as DOMContainer};
2
+ import{__decorate as e}from"tslib";import{byId as t,reparent as n}from"../core/domUtils.js";import{on as r}from"../core/events.js";import{makeHandle as i}from"../core/handleUtils.js";import a from"../core/Logger.js";import{destroyMaybe as o,removeMaybe as s}from"../core/maybe.js";import{watch as c,initial as l,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as f,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as m}from"./Attribution.js";import h from"./overlay/FocusRegionOverlayItem.js";import g from"./overlay/ViewOverlay.js";const _=[0,0];function v(e){let t=(e.ownerDocument||window.document).defaultView,n=e.getBoundingClientRect();return _[0]=n.left+(t?.pageXOffset??0),_[1]=n.top+(t?.pageYOffset??0),_}function y(e){e&&(e.textContent=``,e.parentNode&&e.parentNode.removeChild(e))}const b=process.env.NODE_ENV===`test`,x=b?0:16,S=b?0:750,C=b?0:512,w={left:0,top:0,right:0,bottom:0},T={toggle:`KeyO`,resizeLarger:`ArrowUp`,resizeSmaller:`ArrowDown`,select:new Set([`Enter`,`Space`])},E=_=>{let b=_,E=class extends b{constructor(...e){super(...e),this._freqInfo={freq:x,time:S},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new h,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionVisible=!1,this.focusRegionShortcutEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([c(()=>[this.focusRegionVisible,this.overlay,this.ready],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionVisible&&this.ready),{initial:!0}),c(()=>this.cursor,e=>{let{surface:t}=this;t&&t.setAttribute(`data-cursor`,e)}),c(()=>this.navigating,e=>{let{surface:t}=this;t&&t.setAttribute(`data-navigating`,e.toString())}),c(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),c(()=>{let{left:e,top:t,right:n,bottom:r}=this.padding??w;return[this.width,this.height,e,t,n,r]},([e,t,n,r,i,a])=>{let{_focusRegionOverlayItem:o}=this;o.backgroundHeight=t,o.backgroundWidth=e,o.padding={left:n,top:r,right:i,bottom:a},o.updateBoxSize()})])}initialize(){let e=this;this.addHandles([c(()=>this.ui,(e,t)=>this._handleUIChange(e,t),l),e.on(`focus`,()=>this.notifyChange(`focused`)),e.on(`blur`,()=>this.notifyChange(`focused`)),e.on(`key-down`,t=>{let{shiftKey:n,altKey:r,code:i,defaultPrevented:a}=t.native,{toggle:o,resizeLarger:s,resizeSmaller:c,select:l}=T,u=this.focusRegionVisible&&n&&r&&(i===s||i===c);if(!t.repeat||u){if(!a&&n&&r&&i===o&&this.focusRegionShortcutEnabled){this._toggleFocusRegion(),t.preventDefault();return}if(!a&&u){let{_focusRegionOverlayItem:e}=this;e.resizeBoxSize(i===s?50:-50),t.preventDefault(),t.native.stopPropagation(),t.stopPropagation();return}if(!a&&this.focusRegionVisible&&l.has(i)){this._selectFocusRegion(t,e);return}}})])}destroy(){this.destroyed||(this.focusRegionVisible=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get(`container`)??null}set container(e){let r=this._get(`container`),i=t(e);if(!i&&typeof e==`string`&&a.getLogger(this).error(`#container`,`element with id '${e}' not found`),r===i)return;if(this._stopMeasuring(),this.removeHandles(`container`),r&&(r.classList.remove(`esri-view`),this._overlayRenderTaskHandle&&=(this._overlayRenderTaskHandle.remove(),null),this.overlay&&(this.overlay.destroy(),this._set(`overlay`,null)),this._attribution=o(this._attribution),this.root&&(y(this.root),this._set(`root`,null)),this.userContent&&(n(this.userContent,r),y(this.userContent),this._set(`userContent`,null))),!i){this._set(`width`,0),this._set(`height`,0),this._set(`position`,null),this._set(`suspended`,!0),this._set(`surface`,null),this._set(`container`,null);return}i.classList.add(`esri-view`);let f=document.createElement(`div`);f.className=`esri-view-user-storage`,n(i,f),i.appendChild(f),this._set(`userContent`,f);let p=document.createElement(`div`);p.className=`esri-view-root`,i.insertBefore(p,i.firstChild),this._set(`root`,p);let h=document.createElement(`div`);h.className=`esri-view-surface`,h.setAttribute(`role`,`application`),h.tabIndex=0,p.appendChild(h),this._set(`surface`,h);let _=new g;p.appendChild(_.surface),this._set(`overlay`,_),this._syncFocusRegionOverlayItemVisibility(!1),this.addHandles(c(()=>_.needsRender,e=>{this._overlayRenderTaskHandle=e&&!this._overlayRenderTaskHandle?d({render:()=>this.overlay?.render()}):s(this._overlayRenderTaskHandle)},l),`container`),this.addHandles([c(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:e,items:t,mode:n})=>{if(!e){this._attribution=o(this._attribution);return}this._attribution||=new m({attributionItems:this.attributionItems,mode:this.attributionMode}),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=t,this._attribution.mode=n},u)],`container`),this.forceDOMReadyCycle(),this._set(`container`,i),this._startMeasuring()}get focused(){let e=document.activeElement===this.surface;return document.hasFocus()&&e}get focusRegion(){return this.focusRegionVisible?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get(`ui`)}set ui(e){let t=this._get(`ui`);t!==e&&t?.destroy(),this._set(`ui`,e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,n){let r=this.position;return e-=r?r[0]:0,t-=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}containerToPage(e,t,n){let r=this.position;return e+=r?r[0]:0,t+=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}_updateAria(){let{surface:e,aria:t}=this;e&&(e.ariaLabelledByElements=t?.labelledByElements??null,e.ariaDescribedByElements=t?.describedByElements??null,e.ariaLabel=t?.label??null,e.ariaDescription=t?.description??null)}_selectFocusRegion(e,t){let n=this._makeFocusRegionSelectEvent(e);t.emit(`focus-region-select`,n),e.preventDefault()}_makeFocusRegionSelectEvent(e){let t={type:`focus-region-select`,native:e.native,defaultPrevented:!1,preventDefault:()=>{t.defaultPrevented=!0},stopPropagation:()=>{e.stopPropagation()}};return t}_toggleFocusRegion(){this.focusRegionVisible=!this.focusRegionVisible}_updateFocusRegionOverlayItem(){let{_focusRegionOverlayItem:e}=this;e.backgroundHeight=this.height,e.backgroundWidth=this.width,e.padding=this.padding??w,e.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(e){let{_focusRegionOverlayItem:t,overlay:n}=this,r=e;t.visible=r,n&&(n.removeItem(t),r&&(this._updateFocusRegionOverlayItem(),n.addItem(t)))}_handleUIChange(e,t){this.removeHandles(`ui`),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(c(()=>this.root,t=>{if(!t)e.container=null;else{let n=document.createElement(`div`);t.insertBefore(n,this._attribution?.surface??null),e.container=n}},l),`ui`)),this._set(`ui`,e)}_stopMeasuring(){this.removeHandles(`measuring`),this._get(`resizing`)&&this._set(`resizing`,!1)}_startMeasuring(){let e=this._freqInfo;e.freq=x,e.time=S;let t=d({prepare:e=>{let n=this._measure(),r=this._freqInfo;r.time+=e.deltaTime,n&&(r.freq=x,this._get(`resizing`)||this._set(`resizing`,!0)),!(r.time<r.freq)&&(r.time=0,r.freq=this._position()||n?x:Math.min(S,r.freq*2),!n&&r.freq>=C&&(t.pause(),this._get(`resizing`)&&this._set(`resizing`,!1)))}}),n=new ResizeObserver(n=>{e.freq=x,e.time=S,t.resume()});this.container!=null&&n.observe(this.container);let a=i(()=>n.disconnect());this.addHandles([r(window,`resize`,()=>{e.freq=x,e.time=S,t.resume()}),a,t],`measuring`),this._measure(),this._position()}_measure(){let e=this.container,t=e?e.clientWidth:0,n=e?e.clientHeight:0;if(t===0||n===0)return this.suspended||this._set(`suspended`,!0),!1;let r=this.width,i=this.height;return t===r&&n===i?(this.suspended&&this._set(`suspended`,!1),!1):(this._set(`width`,t),this._set(`height`,n),this.suspended&&this._set(`suspended`,!1),this.emit(`resize`,{oldWidth:r,oldHeight:i,width:t,height:n}),!0)}_position(){let e=this.container,t=this.position,n=e&&v(e);return n&&(!t||n[0]!==t[0]||n[1]!==t[1])?(this._set(`position`,[n[0],n[1]]),!0):!1}forceDOMReadyCycle(){}};return e([f()],E.prototype,`_attribution`,void 0),e([f()],E.prototype,`aria`,void 0),e([f()],E.prototype,`attributionHeight`,null),e([f()],E.prototype,`attributionMode`,void 0),e([f()],E.prototype,`container`,null),e([f({readOnly:!0})],E.prototype,`focused`,null),e([f({readOnly:!0})],E.prototype,`height`,void 0),e([f()],E.prototype,`focusRegionVisible`,void 0),e([f()],E.prototype,`focusRegionShortcutEnabled`,void 0),e([f()],E.prototype,`focusRegion`,null),e([f()],E.prototype,`messagesCommon`,void 0),e([f({type:g})],E.prototype,`overlay`,void 0),e([f({readOnly:!0})],E.prototype,`position`,void 0),e([f({readOnly:!0})],E.prototype,`resizing`,void 0),e([f({readOnly:!0})],E.prototype,`root`,void 0),e([f({value:null,readOnly:!0})],E.prototype,`size`,null),e([f({readOnly:!0})],E.prototype,`surface`,void 0),e([f({readOnly:!0})],E.prototype,`suspended`,void 0),e([f({nonNullable:!0})],E.prototype,`ui`,null),e([f({readOnly:!0})],E.prototype,`userContent`,void 0),e([f({readOnly:!0})],E.prototype,`width`,void 0),e([f()],E.prototype,`widthBreakpoint`,void 0),E=e([p(`esri.views.DOMContainer`)],E),E};export{E as DOMContainer};
@@ -17,6 +17,7 @@ export interface PopupViewProperties extends Partial<Pick<PopupView, "popupEnabl
17
17
  * when the user clicks on the view and [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled) is `true`, when the [openPopup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup) method is called,
18
18
  * or when some widgets need the popup, such as [Search](https://developers.arcgis.com/javascript/latest/references/core/widgets/Search/). If [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup) is `null`, the popup instance will not be created.
19
19
  *
20
+ * @deprecated since version 5.2. Use the `popupElement` on the [Map](/references/map-components/components/arcgis-map/#popupElement), [Scene](/references/map-components/components/arcgis-scene/#popupElement), or [Link Chart](/references/map-components/components/arcgis-link-chart/#popupElement) components instead.
20
21
  * @see [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled)
21
22
  * @see [openPopup()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup)
22
23
  * @see [Loading the Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#loading-the-popup)
@@ -57,6 +58,7 @@ export abstract class PopupView {
57
58
  * when the user clicks on the view and [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled) is `true`, when the [openPopup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup) method is called,
58
59
  * or when some widgets need the popup, such as [Search](https://developers.arcgis.com/javascript/latest/references/core/widgets/Search/). If [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup) is `null`, the popup instance will not be created.
59
60
  *
61
+ * @deprecated since version 5.2. Use the `popupElement` on the [Map](/references/map-components/components/arcgis-map/#popupElement), [Scene](/references/map-components/components/arcgis-scene/#popupElement), or [Link Chart](/references/map-components/components/arcgis-link-chart/#popupElement) components instead.
60
62
  * @see [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled)
61
63
  * @see [openPopup()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup)
62
64
  * @see [Loading the Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#loading-the-popup)
@@ -79,6 +81,7 @@ export abstract class PopupView {
79
81
  * view.popup = null;
80
82
  */
81
83
  get popup(): Popup | null | undefined;
84
+ /** @deprecated */
82
85
  set popup(value: Popup | PopupProperties | null | undefined);
83
86
  /**
84
87
  * Controls whether the popup opens when users click on the view.
@@ -90,6 +93,7 @@ export abstract class PopupView {
90
93
  * When `false`, the click event is ignored and [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup) is not created for features but will open for other
91
94
  * scenarios that use a popup, such as displaying Search results.
92
95
  *
96
+ * @deprecated since version 5.2. Use the `popupDisabled` property on the [Map](/references/map-components/components/arcgis-map/#popupDisabled), [Scene](/references/map-components/components/arcgis-scene/#popupDisabled), or [Link Chart](/references/map-components/components/arcgis-link-chart/#popupDisabled) components instead.
93
97
  * @default true
94
98
  * @since 4.27
95
99
  * @see [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup)
@@ -109,6 +113,7 @@ export abstract class PopupView {
109
113
  /**
110
114
  * Closes the popup.
111
115
  *
116
+ * @deprecated since version 5.2. Use the `closePopup()` method on the [Map](/references/map-components/components/arcgis-map/#closePopup), [Scene](/references/map-components/components/arcgis-scene/#closePopup), or [Link Chart](/references/map-components/components/arcgis-link-chart/#closePopup) components instead.
112
117
  * @since 4.27
113
118
  * @see [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup)
114
119
  * @see [openPopup()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup)
@@ -201,6 +206,7 @@ export abstract class PopupView {
201
206
  * > the view's size constraints in [dockOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#dockOptions) are met or the [location](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#location)
202
207
  * > property is set to a geometry.
203
208
  *
209
+ * @deprecated since version 5.2. Use the `openPopup()` method on the [Map](/references/map-components/components/arcgis-map/#openPopup), [Scene](/references/map-components/components/arcgis-scene/#openPopup), or [Link Chart](/references/map-components/components/arcgis-link-chart/#openPopup) components instead.
204
210
  * @param options - Defines the location and content of the popup when opened.
205
211
  * @returns Resolves when the popup is opened. Calling `openPopup()` or `closePopup()` again rejects the Promise.
206
212
  * @since 4.27
@@ -12,15 +12,24 @@ import type { NavigationProperties } from "./navigation/Navigation.js";
12
12
 
13
13
  export interface VideoViewProperties extends DOMContainerProperties, Partial<Pick<VideoView, "layer" | "map" | "operationalDataVisible" | "scale">> {
14
14
  /**
15
- * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
16
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
15
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
16
+ * this only when they handle focus-region selection. When false, the shortcut does not change
17
+ * focus-region visibility.
18
+ *
19
+ * @internal
20
+ * @since 5.2
21
+ */
22
+ focusRegionShortcutEnabled?: boolean;
23
+ /**
24
+ * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
25
+ * When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
17
26
  *
18
27
  * @internal
19
28
  * @since 5.2
20
29
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
21
30
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
22
31
  */
23
- focusRegionEnabled?: boolean;
32
+ focusRegionVisible?: boolean;
24
33
  /**
25
34
  * Options to configure the navigation behavior of the View.
26
35
  *
@@ -70,32 +79,41 @@ export interface VideoViewProperties extends DOMContainerProperties, Partial<Pic
70
79
  export default class VideoView extends VideoViewSuperclass {
71
80
  constructor(properties?: VideoViewProperties);
72
81
  /**
73
- * The screen rectangle of the active focus region, or `null` when [DOMContainer.focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
82
+ * The screen rectangle of the active focus region, or `null` when [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) is `false`.
74
83
  * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
75
84
  *
76
85
  * | Action | Keyboard Shortcut / Property |
77
86
  * |--------|----------------------------|
78
- * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [DOMContainer.focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) property to `true` or `false`. |
87
+ * | Enable or disable focus region | When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view is in focus. Alternatively, set [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) to `true` or `false`. |
79
88
  * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
80
89
  *
81
90
  * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
82
91
  *
83
92
  * @internal
84
93
  * @since 5.2
85
- * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled)
94
+ * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible)
86
95
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
87
96
  */
88
97
  get focusRegion(): ScreenRect | null;
89
98
  /**
90
- * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
91
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
99
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
100
+ * this only when they handle focus-region selection. When false, the shortcut does not change
101
+ * focus-region visibility.
102
+ *
103
+ * @internal
104
+ * @since 5.2
105
+ */
106
+ accessor focusRegionShortcutEnabled: boolean;
107
+ /**
108
+ * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
109
+ * When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
92
110
  *
93
111
  * @internal
94
112
  * @since 5.2
95
113
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
96
114
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
97
115
  */
98
- accessor focusRegionEnabled: boolean;
116
+ accessor focusRegionVisible: boolean;
99
117
  /** The [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/) to display in the view. */
100
118
  accessor layer: VideoLayer | null | undefined;
101
119
  /** A reference to the associated [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) or [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/). */
package/views/View.d.ts CHANGED
@@ -31,7 +31,7 @@ import type { TimeExtentProperties } from "../time/TimeExtent.js";
31
31
  import type { NavigationProperties } from "./navigation/Navigation.js";
32
32
  import type { ThemeProperties } from "./Theme.js";
33
33
 
34
- export interface ViewProperties<TLayerView extends LayerView = LayerView> extends Partial<Pick<View<TLayerView>, "animation" | "animationsEnabled" | "attributionVisible" | "basemapView" | "displayFilterEnabled" | "fatalError" | "focusRegionEnabled" | "padding">> {
34
+ export interface ViewProperties<TLayerView extends LayerView = LayerView> extends Partial<Pick<View<TLayerView>, "animation" | "animationsEnabled" | "attributionVisible" | "basemapView" | "displayFilterEnabled" | "fatalError" | "focusRegionShortcutEnabled" | "focusRegionVisible" | "padding">> {
35
35
  /**
36
36
  * Allows for adding [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) directly to the default graphics in the View.
37
37
  *
@@ -405,31 +405,40 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
405
405
  */
406
406
  accessor fatalError: EsriError | null | undefined;
407
407
  /**
408
- * The screen rectangle of the active focus region, or `null` when [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionEnabled) is `false`.
408
+ * The screen rectangle of the active focus region, or `null` when [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionVisible) is `false`.
409
409
  * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
410
410
  *
411
411
  * | Action | Keyboard Shortcut / Property |
412
412
  * |--------|----------------------------|
413
- * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionEnabled) property to `true` or `false`. |
413
+ * | Enable or disable focus region | When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionShortcutEnabled) is `true`, use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view is in focus. Alternatively, set [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionVisible) to `true` or `false`. |
414
414
  * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
415
415
  *
416
416
  * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
417
417
  *
418
418
  * @since 5.2
419
- * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionEnabled)
419
+ * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionVisible)
420
420
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
421
421
  */
422
422
  get focusRegion(): ScreenRect | null;
423
423
  /**
424
- * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
425
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
424
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
425
+ * this only when they handle focus-region selection. When false, the shortcut does not change
426
+ * focus-region visibility.
427
+ *
428
+ * @default false
429
+ * @since 5.2
430
+ */
431
+ accessor focusRegionShortcutEnabled: boolean;
432
+ /**
433
+ * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
434
+ * When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
426
435
  *
427
436
  * @default false
428
437
  * @since 5.2
429
438
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegion)
430
439
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
431
440
  */
432
- accessor focusRegionEnabled: boolean;
441
+ accessor focusRegionVisible: boolean;
433
442
  /**
434
443
  * Allows for adding [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) directly to the default graphics in the View.
435
444
  *
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 n}from"../core/asyncUtils.js";import r from"../core/Collection.js";import i from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as s}from"../core/Evented.js";import c from"../core/Handles.js";import{makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as u}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as f,abortMaybe as ee}from"../core/maybe.js";import{EsriPromise as te}from"../core/Promise.js";import{after as p}from"../core/promiseUtils.js";import m from"../core/ReactiveSet.js";import{watch as h,sync as g,whenOnce as _,when as v,syncAndInitial as y}from"../core/reactiveUtils.js";import{property as b,subclass as x}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as S}from"../core/support/OwningCollection.js";import{UpdatingHandles as C}from"../core/support/UpdatingHandles.js";import ne from"../geometry/Extent.js";import w from"../geometry/HeightModelInfo.js";import T from"../geometry/SpatialReference.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as D}from"../support/AnalysesCollection.js";import{GraphicsCollection as O}from"../support/GraphicsCollection.js";import{system as k}from"../time/constants.js";import A from"../time/TimeExtent.js";import{isTimeZoneValid as j}from"../time/timeZoneUtils.js";import M from"./BasemapView.js";import N from"./Magnifier.js";import P from"./SelectionManager.js";import F from"./Theme.js";import{ToolViewManager as I}from"./ToolViewManager.js";import{GlyphMosaic as L}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as R}from"./3d/support/DefaultHighlights.js";import z from"./input/Input.js";import{ViewEvents as B}from"./input/ViewEvents.js";import V from"./interactive/options/ViewOptions.js";import H from"./navigation/Navigation.js";import{deduplicateAttributionItems as U}from"./support/attributionUtils.js";import{DefaultsFromMap as W}from"./support/DefaultsFromMap.js";import{defaultHighlightName as G}from"./support/HighlightDefaults.js";import K from"./support/HighlightOptions.js";import q from"./support/LayerViewManager.js";import J from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as Y}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as X}from"./support/WebGLRequirements.js";var Z;let Q=class extends s(te){static{Z=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new c,this.updatingHandles=new C,this.allLayerViews=new i({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.focusRegionEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new O,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new N,this.options=new V,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 z,this.navigation=new H,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new B(this),this.requiredFieldsOptions=new J,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 m,this.handles.add(h(()=>this.preconditionsReady,e=>{let t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Z.views.add(this)):(this._lockedSpatialReference=null,Z.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(e){queueMicrotask(()=>{this.fatalError=new o(`view:startup-error`,`View._startup failed`,e)});return}this._glyphMosaic=new L(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},g)),this.analyses=new D}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,_(()=>this.ready)))),this.basemapView=new M({view:this}),this.layerViewManager=new q({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 I({view:this}),this.selectionManager=new P({view:this}),this.addHandles([v(()=>this.readyState===`map-content-error`&&!this.spatialReference,()=>{d.getLogger(this).warn(`#spatialReference`,`no spatial reference could be derived from the currently added map layers`)}),h(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},y),h(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},g),h(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},y),h(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},y)])}get _layerToLayerviewMapping(){return Z._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||(Z.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set(`navigation`,null)),this.graphics=f(this.graphics),this.analyses=f(this.analyses),this.defaultsFromMap.destroy(),this._set(`defaultsFromMap`,null),this.analysisViewManager=f(this.analysisViewManager),this.toolViewManager=f(this.toolViewManager),this.layerViewManager=f(this.layerViewManager),this.selectionManager=f(this.selectionManager),this.basemapView=f(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=f(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 focusRegion(){return null}get attributionItems(){return this.suspended?[]:U(this._get(`attributionItems`),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new W({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`)??R()}set highlights(e){this._set(`highlights`,a(e,this._get(`highlights`),r.ofType(K)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===G)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;let{map:e,spatialReference:t}=this;return!!(!this.fatalError&&this._isValid&&!this._readyCycleForced&&e&&(!u(e)||e.loaded)&&this.width!==0&&this.height!==0&&t&&this._validateSpatialReference(t)&&(this._lockedSpatialReference||this.defaultsFromMap?.ready)&&this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){let t=this._get(`map`);e!==t&&(e?.destroyed&&(d.getLogger(this).warn(`#map`,`The provided map is already destroyed`,{map:e}),e=null),u(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){let 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=n(e=>p(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=ee(this._readyStateWaitingTask),this.removeHandles(`ready-state-task`),this.ready?`ready`:`loading`}get spatialReference(){let{_userSpatialReference:e}=this;if(e&&e.vcsWkid!==null)return e;let t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,n=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return n?.equals(t)?n:t}set spatialReference(e){let t=!E(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()??k}set timeZone(e){this._userTimeZone=e,j(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`){let n=t===`high`?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},i=l(()=>n.remove(r));return n.add(r),this.addHandles(i),i}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new F}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(){let e=X(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn(`#validate()`,e.message),e;let t=await Y();if(t)throw d.getLogger(this).warn(`#validate()`,t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}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&&(v(()=>this.destroyed||this.preconditionsReady===!1,()=>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(){let 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;`);let t=document.createElement(`div`);t.innerHTML=`Unable to display map. WebGL2 support is required.`,t.setAttribute(`style`,`font-size: 24px; font-weight: bold;`);let n=document.createElement(`div`);n.innerHTML=`Ensure that your browser and hardware meet the minimum requirements.`,n.setAttribute(`style`,`font-size: 18px;`);let 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(n),e.appendChild(r);let i=this.getSurface();i&&i.appendChild(e)}};e([b()],Q.prototype,`_userSpatialReference`,void 0),e([b()],Q.prototype,`activeTool`,null),e([b({readOnly:!0})],Q.prototype,`allLayerViews`,void 0),e([b({readOnly:!0})],Q.prototype,`layerviewCollections`,null),e([b(S(D,`analyses`))],Q.prototype,`analyses`,null),e([b()],Q.prototype,`animation`,null),e([b()],Q.prototype,`animationsEnabled`,void 0),e([b()],Q.prototype,`focusRegionEnabled`,void 0),e([b()],Q.prototype,`focusRegion`,null),e([b({readOnly:!0})],Q.prototype,`attributionItems`,null),e([b()],Q.prototype,`attributionVisible`,void 0),e([b()],Q.prototype,`basemapView`,void 0),e([b()],Q.prototype,`center`,null),e([b()],Q.prototype,`defaultsFromMapSettings`,null),e([b()],Q.prototype,`defaultsFromMap`,null),e([b()],Q.prototype,`dependencies`,void 0),e([b()],Q.prototype,`displayFilterEnabled`,void 0),e([b({type:ne})],Q.prototype,`extent`,null),e([b()],Q.prototype,`fatalError`,void 0),e([b(S(O,`graphics`))],Q.prototype,`graphics`,void 0),e([b({readOnly:!0,type:w})],Q.prototype,`heightModelInfo`,null),e([b({type:r.ofType(K)})],Q.prototype,`highlights`,null),e([b({readOnly:!0})],Q.prototype,`interacting`,null),e([b({constructOnly:!0})],Q.prototype,`layerViewFilter`,void 0),e([b({readOnly:!0})],Q.prototype,`navigating`,null),e([b({readOnly:!0})],Q.prototype,`preconditionsReady`,null),e([b({readOnly:!0})],Q.prototype,`typeSpecificPreconditionsReady`,void 0),e([b({type:r,readOnly:!0})],Q.prototype,`layerViews`,void 0),e([b()],Q.prototype,`resolution`,null),e([b({type:N})],Q.prototype,`magnifier`,void 0),e([b({nonNullable:!0,type:V})],Q.prototype,`options`,void 0),e([b({value:null,type:t})],Q.prototype,`map`,null),e([b()],Q.prototype,`padding`,void 0),e([b({readOnly:!0})],Q.prototype,`ready`,void 0),e([b({readOnly:!0})],Q.prototype,`canZoomIn`,null),e([b({readOnly:!0})],Q.prototype,`canZoomOut`,null),e([b()],Q.prototype,`_readyStateWaitingTask`,void 0),e([b({readOnly:!0})],Q.prototype,`readyState`,null),e([b({type:T})],Q.prototype,`spatialReference`,null),e([b()],Q.prototype,`stationary`,null),e([b({type:A})],Q.prototype,`timeExtent`,null),e([b({type:String,nonNullable:!0})],Q.prototype,`timeZone`,null),e([b()],Q.prototype,`tools`,null),e([b()],Q.prototype,`toolViewManager`,void 0),e([b({readOnly:!0})],Q.prototype,`type`,void 0),e([b({type:Number})],Q.prototype,`scale`,void 0),e([b({readOnly:!0})],Q.prototype,`updating`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtentRequired`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtent`,null),e([b()],Q.prototype,`cursor`,null),e([b({readOnly:!0})],Q.prototype,`input`,void 0),e([b({type:H,nonNullable:!0})],Q.prototype,`navigation`,void 0),e([b()],Q.prototype,`layerViewManager`,void 0),e([b()],Q.prototype,`analysisViewManager`,void 0),e([b()],Q.prototype,`selectionManager`,void 0),e([b()],Q.prototype,`width`,void 0),e([b()],Q.prototype,`height`,void 0),e([b({readOnly:!0})],Q.prototype,`resizing`,void 0),e([b({value:null,readOnly:!0})],Q.prototype,`size`,null),e([b({readOnly:!0})],Q.prototype,`suspended`,void 0),e([b({readOnly:!0})],Q.prototype,`viewEvents`,void 0),e([b()],Q.prototype,`_isValid`,void 0),e([b()],Q.prototype,`_readyCycleForced`,void 0),e([b()],Q.prototype,`_lockedSpatialReference`,void 0),e([b()],Q.prototype,`_userTimeZone`,void 0),e([b()],Q.prototype,`_lockedTimeZone`,void 0),e([b()],Q.prototype,`_userTimeExtent`,void 0),e([b()],Q.prototype,`_lockedTimeExtent`,void 0),e([b({type:F})],Q.prototype,`theme`,void 0),e([b({readOnly:!0,type:F})],Q.prototype,`effectiveTheme`,null),e([b({readOnly:!0})],Q.prototype,`registeredComponents`,void 0),Q=Z=e([x(`esri.views.View`)],Q);const $=globalThis.$arcgis;$&&!$.views&&Object.defineProperty($,"views",{configurable:!1,enumerable:!0,writable:!1,value:Q.views});function re(e){return e.layerViews}export{Q as default};
2
+ import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as n}from"../core/asyncUtils.js";import r from"../core/Collection.js";import i from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as s}from"../core/Evented.js";import c from"../core/Handles.js";import{makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as u}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as f,abortMaybe as ee}from"../core/maybe.js";import{EsriPromise as te}from"../core/Promise.js";import{after as p}from"../core/promiseUtils.js";import m from"../core/ReactiveSet.js";import{watch as h,sync as g,whenOnce as _,when as v,syncAndInitial as y}from"../core/reactiveUtils.js";import{property as b,subclass as x}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as S}from"../core/support/OwningCollection.js";import{UpdatingHandles as C}from"../core/support/UpdatingHandles.js";import ne from"../geometry/Extent.js";import w from"../geometry/HeightModelInfo.js";import T from"../geometry/SpatialReference.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as D}from"../support/AnalysesCollection.js";import{GraphicsCollection as O}from"../support/GraphicsCollection.js";import{system as k}from"../time/constants.js";import A from"../time/TimeExtent.js";import{isTimeZoneValid as j}from"../time/timeZoneUtils.js";import M from"./BasemapView.js";import N from"./Magnifier.js";import P from"./SelectionManager.js";import F from"./Theme.js";import{ToolViewManager as I}from"./ToolViewManager.js";import{GlyphMosaic as L}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as R}from"./3d/support/DefaultHighlights.js";import z from"./input/Input.js";import{ViewEvents as B}from"./input/ViewEvents.js";import V from"./interactive/options/ViewOptions.js";import H from"./navigation/Navigation.js";import{deduplicateAttributionItems as U}from"./support/attributionUtils.js";import{DefaultsFromMap as W}from"./support/DefaultsFromMap.js";import{defaultHighlightName as G}from"./support/HighlightDefaults.js";import K from"./support/HighlightOptions.js";import q from"./support/LayerViewManager.js";import J from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as Y}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as X}from"./support/WebGLRequirements.js";var Z;let Q=class extends s(te){static{Z=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new c,this.updatingHandles=new C,this.allLayerViews=new i({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.focusRegionVisible=!1,this.focusRegionShortcutEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new O,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new N,this.options=new V,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 z,this.navigation=new H,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new B(this),this.requiredFieldsOptions=new J,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 m,this.handles.add(h(()=>this.preconditionsReady,e=>{let t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Z.views.add(this)):(this._lockedSpatialReference=null,Z.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(e){queueMicrotask(()=>{this.fatalError=new o(`view:startup-error`,`View._startup failed`,e)});return}this._glyphMosaic=new L(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},g)),this.analyses=new D}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,_(()=>this.ready)))),this.basemapView=new M({view:this}),this.layerViewManager=new q({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 I({view:this}),this.selectionManager=new P({view:this}),this.addHandles([v(()=>this.readyState===`map-content-error`&&!this.spatialReference,()=>{d.getLogger(this).warn(`#spatialReference`,`no spatial reference could be derived from the currently added map layers`)}),h(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},y),h(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},g),h(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},y),h(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},y)])}get _layerToLayerviewMapping(){return Z._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||(Z.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set(`navigation`,null)),this.graphics=f(this.graphics),this.analyses=f(this.analyses),this.defaultsFromMap.destroy(),this._set(`defaultsFromMap`,null),this.analysisViewManager=f(this.analysisViewManager),this.toolViewManager=f(this.toolViewManager),this.layerViewManager=f(this.layerViewManager),this.selectionManager=f(this.selectionManager),this.basemapView=f(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=f(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 focusRegion(){return null}get attributionItems(){return this.suspended?[]:U(this._get(`attributionItems`),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new W({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`)??R()}set highlights(e){this._set(`highlights`,a(e,this._get(`highlights`),r.ofType(K)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===G)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;let{map:e,spatialReference:t}=this;return!!(!this.fatalError&&this._isValid&&!this._readyCycleForced&&e&&(!u(e)||e.loaded)&&this.width!==0&&this.height!==0&&t&&this._validateSpatialReference(t)&&(this._lockedSpatialReference||this.defaultsFromMap?.ready)&&this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){let t=this._get(`map`);e!==t&&(e?.destroyed&&(d.getLogger(this).warn(`#map`,`The provided map is already destroyed`,{map:e}),e=null),u(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){let 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=n(e=>p(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=ee(this._readyStateWaitingTask),this.removeHandles(`ready-state-task`),this.ready?`ready`:`loading`}get spatialReference(){let{_userSpatialReference:e}=this;if(e&&e.vcsWkid!==null)return e;let t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,n=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return n?.equals(t)?n:t}set spatialReference(e){let t=!E(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()??k}set timeZone(e){this._userTimeZone=e,j(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`){let n=t===`high`?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},i=l(()=>n.remove(r));return n.add(r),this.addHandles(i),i}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new F}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(){let e=X(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn(`#validate()`,e.message),e;let t=await Y();if(t)throw d.getLogger(this).warn(`#validate()`,t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}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&&(v(()=>this.destroyed||this.preconditionsReady===!1,()=>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(){let 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;`);let t=document.createElement(`div`);t.innerHTML=`Unable to display map. WebGL2 support is required.`,t.setAttribute(`style`,`font-size: 24px; font-weight: bold;`);let n=document.createElement(`div`);n.innerHTML=`Ensure that your browser and hardware meet the minimum requirements.`,n.setAttribute(`style`,`font-size: 18px;`);let 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(n),e.appendChild(r);let i=this.getSurface();i&&i.appendChild(e)}};e([b()],Q.prototype,`_userSpatialReference`,void 0),e([b()],Q.prototype,`activeTool`,null),e([b({readOnly:!0})],Q.prototype,`allLayerViews`,void 0),e([b({readOnly:!0})],Q.prototype,`layerviewCollections`,null),e([b(S(D,`analyses`))],Q.prototype,`analyses`,null),e([b()],Q.prototype,`animation`,null),e([b()],Q.prototype,`animationsEnabled`,void 0),e([b()],Q.prototype,`focusRegionVisible`,void 0),e([b()],Q.prototype,`focusRegionShortcutEnabled`,void 0),e([b()],Q.prototype,`focusRegion`,null),e([b({readOnly:!0})],Q.prototype,`attributionItems`,null),e([b()],Q.prototype,`attributionVisible`,void 0),e([b()],Q.prototype,`basemapView`,void 0),e([b()],Q.prototype,`center`,null),e([b()],Q.prototype,`defaultsFromMapSettings`,null),e([b()],Q.prototype,`defaultsFromMap`,null),e([b()],Q.prototype,`dependencies`,void 0),e([b()],Q.prototype,`displayFilterEnabled`,void 0),e([b({type:ne})],Q.prototype,`extent`,null),e([b()],Q.prototype,`fatalError`,void 0),e([b(S(O,`graphics`))],Q.prototype,`graphics`,void 0),e([b({readOnly:!0,type:w})],Q.prototype,`heightModelInfo`,null),e([b({type:r.ofType(K)})],Q.prototype,`highlights`,null),e([b({readOnly:!0})],Q.prototype,`interacting`,null),e([b({constructOnly:!0})],Q.prototype,`layerViewFilter`,void 0),e([b({readOnly:!0})],Q.prototype,`navigating`,null),e([b({readOnly:!0})],Q.prototype,`preconditionsReady`,null),e([b({readOnly:!0})],Q.prototype,`typeSpecificPreconditionsReady`,void 0),e([b({type:r,readOnly:!0})],Q.prototype,`layerViews`,void 0),e([b()],Q.prototype,`resolution`,null),e([b({type:N})],Q.prototype,`magnifier`,void 0),e([b({nonNullable:!0,type:V})],Q.prototype,`options`,void 0),e([b({value:null,type:t})],Q.prototype,`map`,null),e([b()],Q.prototype,`padding`,void 0),e([b({readOnly:!0})],Q.prototype,`ready`,void 0),e([b({readOnly:!0})],Q.prototype,`canZoomIn`,null),e([b({readOnly:!0})],Q.prototype,`canZoomOut`,null),e([b()],Q.prototype,`_readyStateWaitingTask`,void 0),e([b({readOnly:!0})],Q.prototype,`readyState`,null),e([b({type:T})],Q.prototype,`spatialReference`,null),e([b()],Q.prototype,`stationary`,null),e([b({type:A})],Q.prototype,`timeExtent`,null),e([b({type:String,nonNullable:!0})],Q.prototype,`timeZone`,null),e([b()],Q.prototype,`tools`,null),e([b()],Q.prototype,`toolViewManager`,void 0),e([b({readOnly:!0})],Q.prototype,`type`,void 0),e([b({type:Number})],Q.prototype,`scale`,void 0),e([b({readOnly:!0})],Q.prototype,`updating`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtentRequired`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtent`,null),e([b()],Q.prototype,`cursor`,null),e([b({readOnly:!0})],Q.prototype,`input`,void 0),e([b({type:H,nonNullable:!0})],Q.prototype,`navigation`,void 0),e([b()],Q.prototype,`layerViewManager`,void 0),e([b()],Q.prototype,`analysisViewManager`,void 0),e([b()],Q.prototype,`selectionManager`,void 0),e([b()],Q.prototype,`width`,void 0),e([b()],Q.prototype,`height`,void 0),e([b({readOnly:!0})],Q.prototype,`resizing`,void 0),e([b({value:null,readOnly:!0})],Q.prototype,`size`,null),e([b({readOnly:!0})],Q.prototype,`suspended`,void 0),e([b({readOnly:!0})],Q.prototype,`viewEvents`,void 0),e([b()],Q.prototype,`_isValid`,void 0),e([b()],Q.prototype,`_readyCycleForced`,void 0),e([b()],Q.prototype,`_lockedSpatialReference`,void 0),e([b()],Q.prototype,`_userTimeZone`,void 0),e([b()],Q.prototype,`_lockedTimeZone`,void 0),e([b()],Q.prototype,`_userTimeExtent`,void 0),e([b()],Q.prototype,`_lockedTimeExtent`,void 0),e([b({type:F})],Q.prototype,`theme`,void 0),e([b({readOnly:!0,type:F})],Q.prototype,`effectiveTheme`,null),e([b({readOnly:!0})],Q.prototype,`registeredComponents`,void 0),Q=Z=e([x(`esri.views.View`)],Q);const $=globalThis.$arcgis;$&&!$.views&&Object.defineProperty($,"views",{configurable:!1,enumerable:!0,writable:!1,value:Q.views});function re(e){return e.layerViews}export{Q as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import n from"../../../core/Logger.js";import{memoize as r}from"../../../core/memoize.js";import{ignoreAbortErrors as i}from"../../../core/promiseUtils.js";import{valueInUnit as a}from"../../../core/quantity.js";import{createScreenPoint as o}from"../../../core/screenUtils.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{fromArray as l,create as u}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{normalize as d}from"../../../core/libs/gl-matrix-2/math/vec2.js";import f from"../../../geometry/Point.js";import{pointEquals as p}from"../../../layers/graphics/dehydratedFeatureComparison.js";import{makeDehydratedPoint as m}from"../../../layers/graphics/dehydratedPoint.js";import{getZFromVertexSnappingCandidates as h}from"./drawUtils.js";import{getPolylineOrPolygonConstraint as g,getPointConstraint as _,pointToConstraintSpace as v,constraintSpaceToPoint as y}from"../../interactive/sketch/constraintUtils.js";import{SnappingContext as b}from"../../interactive/snapping/SnappingContext.js";import{SnappingOperation as x}from"../../interactive/snapping/SnappingOperation.js";let S=class extends t{constructor(e){super(e),this._snappingOperation=null,this.role=`primary`,this.captureMode=`capture-always`,this.defaultCaptureMode=`capture-always`,this.snappingEnabled=!0,this.selfSnappingEnabled=!0,this.editSession=null,this.outputMapPositionOfDragStart=null,this.selectedSnappingResult=null,this.screenPosition=null,this.inputMapPosition=null,this.drawToolDragging=!1,this.manipulatorDragging=!1,this.activePointerId=null,this.activePointerType=null,this._getSnappingContext=r((e,t,n,r,i,a)=>n?new b({elevationInfo:r,pointer:e,vertexHandle:t,editGeometryOperations:n,visualizer:i,suppressSelfSnapping:!a}):null)}get grabbable(){return this.captureMode===`grabbable-object`}get following(){let{captureMode:e}=this;return e===`capture-always`||e===`capture-when-engaged`}get outputMapPosition(){return this._get(`outputMapPosition`)}set outputMapPosition(e){let t=this._get(`outputMapPosition`);e&&t&&p(e,t)||this._set(`outputMapPosition`,e)}get dragging(){return this.drawToolDragging||this.manipulatorDragging}get firstPointZ(){let e=this.editSession?.lastPointAddedBySession;if(!e)return null;let t=this.editSession?.getInformationAboutPoint(0,e.partIndex);return t?.point.hasZ?t.point.z:null}async moveTo(e,t){let{snappingManager:n,skipSnapping:r,surfaceManager:a,pointerType:o,editGeometryOperations:s,snappingVisualizer:c}=t;this.notePointerActivity(t.pointerId,o);let l=this._getSnappingContext(o??`mouse`,this.editSession?.endVertex,s,a?.elevationInfo,c,this.selfSnappingEnabled),u=this._ensureSnappingOperation(t);e&&(this.screenPosition=e);let d=this.screenPosition;if(!d)return null;let h=this.firstPointZ,g=a?.screenToMap(d,{firstPointZ:h});if(this.inputMapPosition=g,this.selectedSnappingResult=null,!n||!g||!l||r||!this.snappingEnabled)return this.selectedSnappingResult=void 0,this.outputMapPosition=this._finalizeSnappingAndConstraintResult(null,g,t);let _=m(g.x,g.y,g.z,g?.spatialReference),v=a?.screenToScene?.(d,{firstPointZ:h}),y=u.snap({point:_,scenePoint:v},n,l),b=()=>{let e=u.stagedPoint;return p(this.selectedSnappingResult,e)||(this.selectedSnappingResult=e==null?null:new f({...e})),this.outputMapPosition=this._finalizeSnappingAndConstraintResult(this.selectedSnappingResult,g,t)};return b(),i(y.then(b))}async moveDeltaRelativeToScreen(e,t,n){let{inputMapPosition:r,screenPosition:i,firstPointZ:a}=this;if(!r)return null;let s=n.surfaceManager?n.surfaceManager.mapToScreen(r,{firstPointZ:a}):i;if(!s)return null;let c=o(s.x+e,s.y+t);return this.moveTo(c,n)}async noteDragStart(e,t){if(this.notePointerDown(t.pointerId,t.pointerType),this.drawToolDragging=!0,t.skipSnapping||!this.snappingEnabled)return null;let{snappingManager:r,surfaceManager:a,pointerType:o,editGeometryOperations:s,snappingVisualizer:c}=t,l=this._getSnappingContext(o??`mouse`,this.editSession?.endVertex,s,a?.elevationInfo,c,this.selfSnappingEnabled),u=this._ensureSnappingOperation(t),d=this.firstPointZ,p=a?.screenToMap(e,{firstPointZ:d});if(this.outputMapPositionOfDragStart=null,r&&l&&p){let o=u.snap({point:m(p.x,p.y,p.z,p?.spatialReference),scenePoint:a?.screenToScene?.(e,{firstPointZ:d})},r,l);return i(o.then(()=>{let e=u.stagedPoint?new f({...u.stagedPoint}):null;return this.outputMapPositionOfDragStart=this._finalizeSnappingAndConstraintResult(e,p,t)})).catch(e=>(n.getLogger(this).error(`drawtool:handle:snapping-failed`,e),null))}return this.outputMapPositionOfDragStart=p,null}async noteDragEnd(e,t){return this.moveTo(e,t).finally(()=>{this.drawToolDragging=!1,this.notePointerUp(t.pointerId,t.pointerType)})}notePointerActivity(e=null,t=null){t&&(this.activePointerType=t),e!=null&&this.dragging&&(this.activePointerId=e)}notePointerDown(e=null,t=null){e!=null&&(this.activePointerId=e),t&&(this.activePointerType=t)}notePointerUp(e=null,t=null){(e==null||this.activePointerId==null||this.activePointerId===e)&&(this.activePointerId=null),t&&this.activePointerType===t&&(this.activePointerType=null)}async moveDeltaRelativeToSketchSegment(e,t){let n=this.editSession?.endVertex?.leftSegment?.leftVertex?.pos,{firstPointZ:r}=this,i=this.inputMapPosition?t.surfaceManager?.mapToScreen(this.inputMapPosition,{firstPointZ:r})??this.screenPosition:this.screenPosition;if(!n||!i)return null;let a=t.editGeometryOperations?.data?.coordinateHelper.vectorToPoint(n);if(!a)return null;let o=t.surfaceManager?.mapToScreen(a,{firstPointZ:r});if(!o)return null;let s=[i.x-o.x,i.y-o.y],c=d(u(),l(s)),[f,p]=[c[0]*e,c[1]*e];return this.moveDeltaRelativeToScreen(f,p,t)}refreshConstraint(e){let t=this.outputMapPosition??this.inputMapPosition;return this.outputMapPosition=this._finalizeSnappingAndConstraintResult(null,t,e)}_finalizeSnappingAndConstraintResult(e,t,n){let r=e??t;r&&(r.z=h(n.snappingManager)??r.z);let i=(r?n.surfaceManager?.constrainZToEffectiveSurface?.(r):null)??r;return this._ensureZ(this._applyTooltipConstraints(i,n),n)}_applyTooltipConstraints(e,t){let n=e,r=t.tooltipManager?.getConstraints(this);if(!r&&!t.interactiveHandleManager?.customConstraints||!n)return n;let i=t.interactiveHandleManager?.customConstraints,o=t.editGeometryOperations?.data?.coordinateHelper;if(!o)return n;if(i&&this.editSession&&n){let e={handle:this,editSession:this.editSession,toScreen:e=>t.surfaceManager?.mapToScreen(e,{firstPointZ:this.firstPointZ})??null};for(let t of i)n=t(n,e)||n}let s=(this.editSession?.endVertex)?.leftSegment?.leftVertex,c=s?.leftSegment?.leftVertex,l=s&&o.vectorToPoint(s.pos),u=c&&o.vectorToPoint(c.pos);if(!r)return n;let d=(l||u)&&this.role===`primary`?g(l,u,r):_(r);if(!n||!r||!d)return n;let{context:p}=r,m=v(n,p),h=m?d.closestTo(m):void 0;if(!h)return n;let b=y(h,n,p),x=t.surfaceManager?.view?.type===`2d`||p.elevationInfo.mode!==`absolute-height`,S=r.elevation,{hasZ:C,metersPerVerticalUnit:w}=t.surfaceManager??{};return b!=null&&x&&S!=null&&C&&w&&(b.z=a(S,`meters`)/w),b?new f({x:b.x,y:b.y,z:b.z,hasM:b.hasM,hasZ:b.hasZ,m:b.m,spatialReference:b.spatialReference}):null}_ensureZ(e,t){return!e||!t.hasZ||(e.z==null||!e.hasZ)&&(e.z=t.defaultZ??0,e.hasZ=!0),e}_ensureSnappingOperation({view:e}){return this._snappingOperation??=new x({view:e})}};e([s()],S.prototype,`_snappingOperation`,void 0),e([s()],S.prototype,`role`,void 0),e([s()],S.prototype,`name`,void 0),e([s()],S.prototype,`captureMode`,void 0),e([s()],S.prototype,`defaultCaptureMode`,void 0),e([s()],S.prototype,`grabbable`,null),e([s()],S.prototype,`following`,null),e([s()],S.prototype,`snappingEnabled`,void 0),e([s()],S.prototype,`selfSnappingEnabled`,void 0),e([s()],S.prototype,`editSession`,void 0),e([s()],S.prototype,`outputMapPosition`,null),e([s()],S.prototype,`outputMapPositionOfDragStart`,void 0),e([s()],S.prototype,`selectedSnappingResult`,void 0),e([s()],S.prototype,`screenPosition`,void 0),e([s()],S.prototype,`inputMapPosition`,void 0),e([s()],S.prototype,`dragging`,null),e([s()],S.prototype,`drawToolDragging`,void 0),e([s()],S.prototype,`manipulatorDragging`,void 0),e([s()],S.prototype,`activePointerId`,void 0),e([s()],S.prototype,`activePointerType`,void 0),e([s({readOnly:!0})],S.prototype,`firstPointZ`,null),S=e([c(`esri.views.draw.support.InteractiveHandle`)],S);export{S as InteractiveHandle};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import n from"../../../core/Logger.js";import{memoize as r}from"../../../core/memoize.js";import{ignoreAbortErrors as i}from"../../../core/promiseUtils.js";import{valueInUnit as a}from"../../../core/quantity.js";import{createScreenPoint as o}from"../../../core/screenUtils.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{fromArray as l,create as u}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{normalize as d}from"../../../core/libs/gl-matrix-2/math/vec2.js";import f from"../../../geometry/Point.js";import{pointEquals as p}from"../../../layers/graphics/dehydratedFeatureComparison.js";import{makeDehydratedPoint as m}from"../../../layers/graphics/dehydratedPoint.js";import{getZFromVertexSnappingCandidates as h}from"./drawUtils.js";import{getPolylineOrPolygonConstraint as g,getPointConstraint as _,pointToConstraintSpace as v,constraintSpaceToPoint as y}from"../../interactive/sketch/constraintUtils.js";import{SnappingContext as b}from"../../interactive/snapping/SnappingContext.js";import{SnappingOperation as x}from"../../interactive/snapping/SnappingOperation.js";let S=class extends t{constructor(e){super(e),this._snappingOperation=null,this.role=`primary`,this.captureMode=`capture-always`,this.defaultCaptureMode=`capture-always`,this.snappingEnabled=!0,this.selfSnappingEnabled=!0,this.editSession=null,this.outputMapPositionOfDragStart=null,this.selectedSnappingResult=null,this.screenPosition=null,this.inputMapPosition=null,this.drawToolDragging=!1,this.manipulatorDragging=!1,this.activePointerId=null,this.activePointerType=null,this._getSnappingContext=r((e,t,n,r,i,a)=>n?new b({elevationInfo:r,pointer:e,vertexHandle:t,editGeometryOperations:n,visualizer:i,suppressSelfSnapping:!a}):null)}get grabbable(){return this.captureMode===`grabbable-object`}get following(){let{captureMode:e}=this;return e===`capture-always`||e===`capture-when-engaged`}get outputMapPosition(){return this._get(`outputMapPosition`)}set outputMapPosition(e){let t=this._get(`outputMapPosition`);e&&t&&p(e,t)||this._set(`outputMapPosition`,e)}get dragging(){return this.drawToolDragging||this.manipulatorDragging}get firstPointZ(){let e=this.editSession?.lastPointAddedBySession;if(!e)return null;let t=this.editSession?.getInformationAboutPoint(0,e.partIndex);return t?.point.hasZ?t.point.z:null}async moveTo(e,t){let{snappingManager:n,skipSnapping:r,surfaceManager:a,pointerType:o,editGeometryOperations:s,snappingVisualizer:c}=t;this.notePointerActivity(t.pointerId,o);let l=this._getSnappingContext(o??`mouse`,this.editSession?.endVertex,s,a?.elevationInfo,c,this.selfSnappingEnabled),u=this._ensureSnappingOperation(t);e&&(this.screenPosition=e);let d=this.screenPosition;if(!d)return null;let h=this.firstPointZ,g=a?.screenToMap(d,{firstPointZ:h});if(this.inputMapPosition=g,this.selectedSnappingResult=null,!n||!g||!l||r||!this.snappingEnabled)return this.selectedSnappingResult=void 0,this.outputMapPosition=this._finalizeSnappingAndConstraintResult(null,g,t);let _=m(g.x,g.y,g.z,g?.spatialReference),v=a?.screenToScene?.(d,{firstPointZ:h}),y=u.snap({point:_,scenePoint:v},n,l),b=()=>{let e=u.stagedPoint;return p(this.selectedSnappingResult,e)||(this.selectedSnappingResult=e==null?null:new f({...e})),this.outputMapPosition=this._finalizeSnappingAndConstraintResult(this.selectedSnappingResult,g,t)};return b(),i(y.then(b))}async moveDeltaRelativeToScreen(e,t,n){let{inputMapPosition:r,screenPosition:i,firstPointZ:a}=this;if(!r)return null;let s=n.surfaceManager?n.surfaceManager.mapToScreen(r,{firstPointZ:a}):i;if(!s)return null;let c=o(s.x+e,s.y+t);return this.moveTo(c,n)}async noteDragStart(e,t){if(this.notePointerDown(t.pointerId,t.pointerType),this.drawToolDragging=!0,t.skipSnapping||!this.snappingEnabled)return null;let{snappingManager:r,surfaceManager:a,pointerType:o,editGeometryOperations:s,snappingVisualizer:c}=t,l=this._getSnappingContext(o??`mouse`,this.editSession?.endVertex,s,a?.elevationInfo,c,this.selfSnappingEnabled),u=this._ensureSnappingOperation(t),d=this.firstPointZ,p=a?.screenToMap(e,{firstPointZ:d});if(this.outputMapPositionOfDragStart=null,r&&l&&p){let o=u.snap({point:m(p.x,p.y,p.z,p?.spatialReference),scenePoint:a?.screenToScene?.(e,{firstPointZ:d})},r,l);return i(o.then(()=>{let e=u.stagedPoint?new f({...u.stagedPoint}):null;return this.outputMapPositionOfDragStart=this._finalizeSnappingAndConstraintResult(e,p,t)})).catch(e=>(n.getLogger(this).error(`drawtool:handle:snapping-failed`,e),null))}return this.outputMapPositionOfDragStart=p,null}async noteDragEnd(e,t){return this.moveTo(e,t).finally(()=>{this.drawToolDragging=!1,this.notePointerUp(t.pointerId,t.pointerType)})}notePointerActivity(e=null,t=null){t&&(this.activePointerType=t),e!=null&&this.dragging&&(this.activePointerId=e)}notePointerDown(e=null,t=null){e!=null&&(this.activePointerId=e),t&&(this.activePointerType=t)}notePointerUp(e=null,t=null){(e==null||this.activePointerId==null||this.activePointerId===e)&&(this.activePointerId=null),t&&this.activePointerType===t&&(this.activePointerType=null)}async moveDeltaRelativeToSketchSegment(e,t){let n=this.editSession?.endVertex?.leftSegment?.leftVertex?.pos,{firstPointZ:r}=this,i=this.inputMapPosition?t.surfaceManager?.mapToScreen(this.inputMapPosition,{firstPointZ:r})??this.screenPosition:this.screenPosition;if(!n||!i)return null;let a=t.editGeometryOperations?.data?.coordinateHelper.vectorToPoint(n);if(!a)return null;let o=t.surfaceManager?.mapToScreen(a,{firstPointZ:r});if(!o)return null;let s=[i.x-o.x,i.y-o.y],c=d(u(),l(s)),[f,p]=[c[0]*e,c[1]*e];return this.moveDeltaRelativeToScreen(f,p,t)}refreshConstraint(e){let t=this.outputMapPosition??this.inputMapPosition;return this.outputMapPosition=this._finalizeSnappingAndConstraintResult(null,t,e)}_finalizeSnappingAndConstraintResult(e,t,n){let r=e??t;r&&n.view.type===`2d`&&(r.z=h(n.snappingManager)??r.z);let i=(r?n.surfaceManager?.constrainZToEffectiveSurface?.(r):null)??r;return this._ensureZ(this._applyTooltipConstraints(i,n),n)}_applyTooltipConstraints(e,t){let n=e,r=t.tooltipManager?.getConstraints(this);if(!r&&!t.interactiveHandleManager?.customConstraints||!n)return n;let i=t.interactiveHandleManager?.customConstraints,o=t.editGeometryOperations?.data?.coordinateHelper;if(!o)return n;if(i&&this.editSession&&n){let e={handle:this,editSession:this.editSession,toScreen:e=>t.surfaceManager?.mapToScreen(e,{firstPointZ:this.firstPointZ})??null};for(let t of i)n=t(n,e)||n}let s=(this.editSession?.endVertex)?.leftSegment?.leftVertex,c=s?.leftSegment?.leftVertex,l=s&&o.vectorToPoint(s.pos),u=c&&o.vectorToPoint(c.pos);if(!r)return n;let d=(l||u)&&this.role===`primary`?g(l,u,r):_(r);if(!n||!r||!d)return n;let{context:p}=r,m=v(n,p),h=m?d.closestTo(m):void 0;if(!h)return n;let b=y(h,n,p),x=t.surfaceManager?.view?.type===`2d`||p.elevationInfo.mode!==`absolute-height`,S=r.elevation,{hasZ:C,metersPerVerticalUnit:w}=t.surfaceManager??{};return b!=null&&x&&S!=null&&C&&w&&(b.z=a(S,`meters`)/w),b?new f({x:b.x,y:b.y,z:b.z,hasM:b.hasM,hasZ:b.hasZ,m:b.m,spatialReference:b.spatialReference}):null}_ensureZ(e,t){return!e||!t.hasZ||(e.z==null||!e.hasZ)&&(e.z=t.defaultZ??0,e.hasZ=!0),e}_ensureSnappingOperation({view:e}){return this._snappingOperation??=new x({view:e})}};e([s()],S.prototype,`_snappingOperation`,void 0),e([s()],S.prototype,`role`,void 0),e([s()],S.prototype,`name`,void 0),e([s()],S.prototype,`captureMode`,void 0),e([s()],S.prototype,`defaultCaptureMode`,void 0),e([s()],S.prototype,`grabbable`,null),e([s()],S.prototype,`following`,null),e([s()],S.prototype,`snappingEnabled`,void 0),e([s()],S.prototype,`selfSnappingEnabled`,void 0),e([s()],S.prototype,`editSession`,void 0),e([s()],S.prototype,`outputMapPosition`,null),e([s()],S.prototype,`outputMapPositionOfDragStart`,void 0),e([s()],S.prototype,`selectedSnappingResult`,void 0),e([s()],S.prototype,`screenPosition`,void 0),e([s()],S.prototype,`inputMapPosition`,void 0),e([s()],S.prototype,`dragging`,null),e([s()],S.prototype,`drawToolDragging`,void 0),e([s()],S.prototype,`manipulatorDragging`,void 0),e([s()],S.prototype,`activePointerId`,void 0),e([s()],S.prototype,`activePointerType`,void 0),e([s({readOnly:!0})],S.prototype,`firstPointZ`,null),S=e([c(`esri.views.draw.support.InteractiveHandle`)],S);export{S as InteractiveHandle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{makeHandle as e}from"../../../core/handleUtils.js";import{nextTick as t}from"../../../core/nextTick.js";import{watch as n,syncAndInitial as r}from"../../../core/reactiveUtils.js";import{makeAllLayerSnappingOptions as i}from"./allLayerSnapping.js";import{SnappingManager as a}from"./SnappingManager.js";import o from"./SnappingOptions.js";const s=new Map;function c(t){if(!s.has(t)){let e=i(t,{distance:10}),c=new o,l=n(()=>{let n=t.options.snapping,r=e.options,i=n.featureSources;return{...r.toJSON(),...n.toJSON({origin:`service`}),featureSources:n.originOf(`featureSources`)===`defaults`?r.featureSources:i}},e=>c.set(e),r),u=new a({view:t,options:c});s.set(t,{referenceCount:0,snappingManager:u,remove:()=>{l.remove(),e.remove(),u.destroy()}})}let c=s.get(t);c.referenceCount++;let u=e(()=>l(t,c));return{snappingManager:c.snappingManager,...u}}function l(e,n){n.referenceCount--,!(n.referenceCount>0)&&t(()=>{n.referenceCount===0&&(n.remove(),s.delete(e))})}export{c as acquire};
2
+ import{makeHandle as e}from"../../../core/handleUtils.js";import{nextTick as t}from"../../../core/nextTick.js";import{watch as n,syncAndInitial as r}from"../../../core/reactiveUtils.js";import{makeAllLayerSnappingOptions as i}from"./allLayerSnapping.js";import{SnappingManager as a}from"./SnappingManager.js";import o from"./SnappingOptions.js";const s=new Map;function c(t){if(!s.has(t)){let e=i(t,{distance:10,excludeInternal:!0}),c=new o,l=n(()=>{let n=t.options.snapping,r=e.options,i=n.featureSources;return{...r.toJSON(),...n.toJSON({origin:`service`}),featureSources:n.originOf(`featureSources`)===`defaults`?r.featureSources:i}},e=>c.set(e),r),u=new a({view:t,options:c});s.set(t,{referenceCount:0,snappingManager:u,remove:()=>{l.remove(),e.remove(),u.destroy()}})}let c=s.get(t);c.referenceCount++;let u=e(()=>l(t,c));return{snappingManager:c.snappingManager,...u}}function l(e,n){n.referenceCount--,!(n.referenceCount>0)&&t(()=>{n.referenceCount===0&&(n.remove(),s.delete(e))})}export{c as acquire};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{base as r}from"../css.js";import i from"../../../../widgets/Widget.js";import{loadCalciteComponents as a}from"../../../../widgets/support/componentsUtils.js";import{tsx as o}from"../../../../widgets/support/widget.js";const s=[`absolute-height`,`on-the-ground`,`relative-to-ground`,`relative-to-scene`],c={"absolute-height":`absolute-elevation`,"on-the-ground":`on-the-ground-elevation`,"relative-to-ground":`relative-to-ground-elevation`,"relative-to-scene":`relative-to-scene-elevation`};let l=class extends i{constructor(){super(...arguments),this._dropdown=null,this._onSelect=e=>{let t=e.currentTarget.selectedItems[0]?.getAttribute(`data-mode`),n=s.find(e=>e===t),r=this.context.elevationModeContext;try{n&&!r.disabled&&n!==r.mode&&r.onChange(n)}finally{for(let t of e.currentTarget.querySelectorAll(`calcite-dropdown-item`))t.selected=t.getAttribute(`data-mode`)===r.mode}},this._onDropdownCreate=e=>{this._dropdown=e,e.addEventListener(`keydown`,this._onDropdownKeyDown,!0)},this._onDropdownRemove=e=>{e.removeEventListener(`keydown`,this._onDropdownKeyDown,!0),this._dropdown=null},this._onDropdownKeyDown=e=>{e.key===`Escape`&&this._dropdown?.open&&(e.preventDefault(),e.stopPropagation(),this._dropdown.open=!1,this._dropdown.querySelector(`calcite-button`)?.setFocus())}}render(){let{context:e,mode:t}=this,n=e.elevationModeContext,i=e.messages.sketch.elevationModeSelect,a=n.mode,l=`${i.title}: ${i[a]}`;return o(`div`,null,t===`feedback`?o(`span`,{"aria-label":l,class:`${r}-elevation-mode__feedback`,"data-testid":`tooltip-elevation-mode-feedback`,key:`feedback`,role:`img`,title:l},o(`calcite-icon`,{icon:c[a],scale:`s`})):o(`calcite-dropdown`,{afterCreate:this._onDropdownCreate,afterRemoved:this._onDropdownRemove,class:`${r}-elevation-mode__dropdown`,"data-testid":`tooltip-elevation-mode`,key:`input`,placement:`bottom-end`,scale:`s`,topLayerDisabled:e.topLayerDisabled,onCalciteDropdownSelect:this._onSelect},o(`calcite-button`,{appearance:`transparent`,"data-field-name":`elevation`,"data-testid":`tooltip-elevation-mode-trigger`,"data-tooltip-inline-control":``,disabled:n.disabled,iconStart:c[a],kind:`neutral`,label:l,scale:`s`,slot:`trigger`,title:l}),o(`calcite-dropdown-group`,{selectionMode:`single`},s.map(e=>o(`calcite-dropdown-item`,{"data-mode":e,"data-testid":`tooltip-elevation-mode-${e}`,iconStart:c[e],key:e,selected:e===a},i[e])))))}loadDependencies(){return a({button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),dropdown:()=>import(`@esri/calcite-components/dist/components/calcite-dropdown`),"dropdown-group":()=>import(`@esri/calcite-components/dist/components/calcite-dropdown-group`),"dropdown-item":()=>import(`@esri/calcite-components/dist/components/calcite-dropdown-item`)})}};e([t()],l.prototype,`context`,void 0),e([t()],l.prototype,`mode`,void 0),l=e([n(`esri.views.interactive.tooltip.components.ElevationModeSelect`)],l);export{l as ElevationModeSelect};
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{base as r}from"../css.js";import i from"../../../../widgets/Widget.js";import{loadCalciteComponents as a}from"../../../../widgets/support/componentsUtils.js";import{tsx as o}from"../../../../widgets/support/widget.js";const s=[`absolute-height`,`on-the-ground`,`relative-to-ground`,`relative-to-scene`],c={"absolute-height":`absolute-elevation`,"on-the-ground":`on-the-ground-elevation`,"relative-to-ground":`relative-to-ground-elevation`,"relative-to-scene":`relative-to-scene-elevation`};let l=class extends i{constructor(){super(...arguments),this._dropdown=null,this._onSelect=e=>{let t=e.currentTarget.selectedItems[0]?.getAttribute(`data-mode`),n=s.find(e=>e===t),r=this.context.elevationModeContext;try{n&&!r.disabled&&n!==r.mode&&r.onChange(n)}finally{for(let t of e.currentTarget.querySelectorAll(`calcite-dropdown-item`))t.selected=t.getAttribute(`data-mode`)===r.mode}},this._onDropdownCreate=e=>{this._dropdown=e,e.addEventListener(`keydown`,this._onDropdownKeyDown,!0)},this._onDropdownRemove=e=>{e.removeEventListener(`keydown`,this._onDropdownKeyDown,!0),this._dropdown=null},this._onDropdownKeyDown=e=>{e.key===`Escape`&&this._dropdown?.open&&(e.preventDefault(),e.stopPropagation(),this._dropdown.open=!1,this._dropdown.querySelector(`calcite-button`)?.setFocus())}}render(){let{context:e,mode:t}=this,n=e.elevationModeContext,i=e.messages.sketch.elevationModeSelect,a=n.mode,l=`${i.title}: ${i[a]}`;return o(`div`,null,t===`feedback`?o(`span`,{"aria-label":l,class:`${r}-elevation-mode__feedback`,"data-testid":`tooltip-elevation-mode-feedback`,key:`feedback`,role:`img`,title:l},o(`calcite-icon`,{icon:c[a],scale:`s`})):o(`calcite-dropdown`,{afterCreate:this._onDropdownCreate,afterRemoved:this._onDropdownRemove,class:`${r}-elevation-mode__dropdown`,"data-testid":`tooltip-elevation-mode`,key:`input`,placement:`bottom-end`,scale:`s`,topLayerDisabled:e.topLayerDisabled,onCalciteDropdownBeforeOpen:e=>void e.currentTarget.setFocus(),onCalciteDropdownSelect:this._onSelect},o(`calcite-button`,{appearance:`transparent`,"data-field-name":`elevation`,"data-testid":`tooltip-elevation-mode-trigger`,"data-tooltip-inline-control":``,disabled:n.disabled,iconStart:c[a],kind:`neutral`,label:l,scale:`s`,slot:`trigger`,title:l}),o(`calcite-dropdown-group`,{selectionMode:`single`},s.map(e=>o(`calcite-dropdown-item`,{"data-mode":e,"data-testid":`tooltip-elevation-mode-${e}`,iconStart:c[e],key:e,selected:e===a},i[e])))))}loadDependencies(){return a({button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),dropdown:()=>import(`@esri/calcite-components/dist/components/calcite-dropdown`),"dropdown-group":()=>import(`@esri/calcite-components/dist/components/calcite-dropdown-group`),"dropdown-item":()=>import(`@esri/calcite-components/dist/components/calcite-dropdown-item`)})}};e([t()],l.prototype,`context`,void 0),e([t()],l.prototype,`mode`,void 0),l=e([n(`esri.views.interactive.tooltip.components.ElevationModeSelect`)],l);export{l as ElevationModeSelect};
@@ -296,7 +296,7 @@ export default abstract class FeatureLikeLayerView extends LayerView {
296
296
  * - When `false`: The layer view does not have m aware features. M-values are not part of the geometry.
297
297
  *
298
298
  * @default false
299
- * @see [FeatureLayerBase.returnM](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/FeatureLayerBase/#returnM) for details regarding fetching m-values with features from a layer
299
+ * @since 5.1
300
300
  * @see [Linear referencing](https://pro.arcgis.com/en/pro-app/latest/help/data/linear-referencing/introduction-to-linear-referencing.htm)
301
301
  */
302
302
  get hasM(): boolean;
@@ -309,7 +309,6 @@ export default abstract class FeatureLikeLayerView extends LayerView {
309
309
  *
310
310
  * @default false
311
311
  * @since 5.1
312
- * @see [FeatureLayerBase.returnZ](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/FeatureLayerBase/#returnZ) for details regarding fetching z-values with features from a layer
313
312
  */
314
313
  get hasZ(): boolean;
315
314
  /**
@@ -12,6 +12,21 @@ import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
12
12
  * @see [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/)
13
13
  */
14
14
  export default abstract class ParquetLayerView extends FeatureLikeLayerView {
15
+ /**
16
+ * Indicates whether the layer view has m-aware geometries. M-values are included whenever the
17
+ * underlying [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#hasM) has m-aware geometries.
18
+ *
19
+ * @since 5.2
20
+ * @see [Linear referencing](https://pro.arcgis.com/en/pro-app/latest/help/data/linear-referencing/introduction-to-linear-referencing.htm)
21
+ */
22
+ get hasM(): boolean;
23
+ /**
24
+ * Indicates whether the layer view has z-aware geometries. Z-values are included whenever the
25
+ * underlying [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#hasZ) has z-aware geometries.
26
+ *
27
+ * @since 5.2
28
+ */
29
+ get hasZ(): boolean;
15
30
  /** The layer being viewed. */
16
31
  get layer(): ParquetLayer;
17
32
  }