@arcgis/core 5.2.0-next.126 → 5.2.0-next.128

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 (234) hide show
  1. package/WebScene.js +1 -1
  2. package/applications/Components/basemapToggleUtils.d.ts +53 -0
  3. package/applications/Components/basemapToggleUtils.js +2 -0
  4. package/applications/SceneViewer/sceneViewerUtils.d.ts +14 -1
  5. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  6. package/applications/WebEditor/sketchUtils.js +1 -1
  7. package/arcgisGlobal.d.ts +1 -0
  8. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  9. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
  12. package/assets/esri/core/workers/chunks/038d2b80d96237c25b6f.js +1 -0
  13. package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{9ca98fffd43e63d5ade3.js → 1c33aa349beea9a3792f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
  17. package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
  18. package/assets/esri/core/workers/chunks/{4d18451e0ea6ca54101a.js → 2ebad7e588b26e74cefe.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{a8258636096416c837a2.js → 3b7dff15a0058ea29886.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
  21. package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
  22. package/assets/esri/core/workers/chunks/3f045f09ac95e7f22a97.js +1 -0
  23. package/assets/esri/core/workers/chunks/500f6d6f0ffa235cae85.js +1 -0
  24. package/assets/esri/core/workers/chunks/{56acda1eed3a013430e2.js → 58fb92775d668cfd295c.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{e6637f9176566382ed3e.js → 606cca69eaea84bfcdc6.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{fdbda3d2afea25142b86.js → 6267a1fe1603daa399b4.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{806f96ad09e882be41af.js → 67fd2cdb2e6834bfa710.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{5fe5ef5ccf480634d159.js → 75294f515c7f8393181c.js} +1 -1
  30. package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
  31. package/assets/esri/core/workers/chunks/761ea719ec1b4d562db2.js +1 -0
  32. package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{30604a29df320d7a4c6b.js → 88e11b645a1361f1bdbe.js} +1 -1
  34. package/assets/esri/core/workers/chunks/89dad6c1bfd81e4d7f8e.js +1 -0
  35. package/assets/esri/core/workers/chunks/{8daed13400d9e63e65ae.js → 8a842cde240aef12e417.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{c692e583e87af58f6d91.js → 8b0d6205ceeec1ab446f.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{57ab87e70ef85b9405f9.js → 8cb216404a6254bc695c.js} +1 -0
  38. package/assets/esri/core/workers/chunks/92509dd25996c6390a31.js +1 -0
  39. package/assets/esri/core/workers/chunks/9ccc2c8f7416943cc373.js +29 -0
  40. package/assets/esri/core/workers/chunks/a0a9c41400ae98df1912.js +1 -0
  41. package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
  43. package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
  44. package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{97602019a1ccad22a03a.js → bbfb80a6983574007ce5.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{d5f72670634e73c0b53a.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{17218d714cb07b607c2f.js → c35e9dee87937f483a3d.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
  50. package/assets/esri/core/workers/chunks/d1187ad6cc4959683819.js +1 -0
  51. package/assets/esri/core/workers/chunks/d94a2b3b2ef49af9c2e3.js +1 -0
  52. package/assets/esri/core/workers/chunks/{cb7cb7d57c4e7f76600f.js → dc92710a8fdfb9135e55.js} +1 -1
  53. package/assets/esri/core/workers/chunks/ec187933b42fe65594b7.js +1 -0
  54. package/assets/esri/core/workers/chunks/eec5a93dbc258a90b6de.js +1 -0
  55. package/assets/esri/core/workers/chunks/{e1ae83ff3e0225708d4d.js → f479b4a4cee4bb2e046c.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
  57. package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
  58. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  59. package/assets/esri/images/portal/propresentation16.png +0 -0
  60. package/assets/esri/images/portal/urbanproject16.png +0 -0
  61. package/assets/esri/images/support/loading-throb.gif +0 -0
  62. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  63. package/assets/esri/themes/base/icons/style.scss +0 -0
  64. package/assets/esri/themes/base/icons/variables.scss +0 -0
  65. package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
  66. package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
  67. package/assets/esri/themes/base/images/files/code-32.svg +0 -0
  68. package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
  69. package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
  70. package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
  71. package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
  72. package/assets/esri/themes/base/images/files/image-32.svg +0 -0
  73. package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
  74. package/assets/esri/themes/base/images/files/report-32.svg +0 -0
  75. package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
  76. package/assets/esri/themes/base/images/files/text-32.svg +0 -0
  77. package/assets/esri/themes/base/images/files/video-32.svg +0 -0
  78. package/assets/esri/themes/base/images/files/word-32.svg +0 -0
  79. package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
  80. package/assets/esri/themes/base/images/loading-throb.gif +0 -0
  81. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
  82. package/assets/esri/themes/base/widgets/_Tooltip.scss +42 -3
  83. package/assets/esri/themes/dark/main.css +1 -1
  84. package/assets/esri/themes/light/main.css +1 -1
  85. package/assets/esri/themes/light/view.css +1 -1
  86. package/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
  87. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  88. package/chunks/GlobalIllumination.glsl.js +1 -0
  89. package/config.js +1 -1
  90. package/core/Accessor.d.ts +1 -1
  91. package/core/lang.js +1 -1
  92. package/core/units.js +1 -1
  93. package/geometry/HeightModelInfo.js +1 -1
  94. package/geometry/ellipsoidUtils.js +1 -1
  95. package/geometry/support/heightModelInfoUtils.js +1 -1
  96. package/interfaces.d.ts +1 -0
  97. package/kernel.js +1 -1
  98. package/layers/ElevationLayer.js +1 -1
  99. package/layers/OrientedImageryLayer.js +1 -1
  100. package/layers/ParquetLayer.d.ts +21 -13
  101. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  102. package/layers/graphics/dehydratedFeatures.js +1 -1
  103. package/layers/graphics/transferFeatures.js +2 -0
  104. package/layers/mixins/FeatureLayerBase.js +1 -1
  105. package/layers/mixins/HeightModelInfoMixin.js +2 -0
  106. package/layers/mixins/SceneService.js +1 -1
  107. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  108. package/layers/raster/datasets/RasterFactory.js +1 -1
  109. package/package.json +3 -3
  110. package/popup/FeatureContentCollection.d.ts +15 -25
  111. package/popup/FeatureContentCollection.js +1 -1
  112. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  113. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  114. package/support/revision.js +1 -1
  115. package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
  116. package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
  117. package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
  118. package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
  119. package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
  120. package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
  121. package/symbols/cim/cimAnalyzer.js +1 -1
  122. package/views/2d/engine/webgl/ClipMesh.js +1 -1
  123. package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
  124. package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
  125. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  126. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  127. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  132. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
  133. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  134. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  136. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  144. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  145. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  146. package/views/2d/layers/LayerView2D.js +1 -1
  147. package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
  148. package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
  149. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  150. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  151. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  152. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  153. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  154. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  155. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  156. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
  157. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  158. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
  159. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  160. package/views/3d/camera/intersectionUtils.js +1 -1
  161. package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
  162. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  163. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  164. package/views/3d/layers/I3SMeshView3D.js +1 -1
  165. package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  167. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  168. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  169. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  170. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  171. package/views/3d/layers/support/FeatureMemory.js +2 -0
  172. package/views/3d/layers/support/FeatureTile.js +1 -1
  173. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  174. package/views/3d/layers/support/featureReference.js +1 -1
  175. package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
  176. package/views/3d/state/Constraints.js +1 -1
  177. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  178. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  179. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  180. package/views/3d/support/PBFDecoder.js +1 -1
  181. package/views/3d/support/PBFDecoderWorker.js +1 -1
  182. package/views/3d/support/QualityProfile.js +1 -1
  183. package/views/3d/support/popupHitTest.js +1 -1
  184. package/views/3d/terrain/TerrainRenderer.js +1 -1
  185. package/views/3d/terrain/TerrainSurface.js +1 -1
  186. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  187. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  188. package/views/DOMContainer.d.ts +2 -2
  189. package/views/DOMContainer.js +1 -1
  190. package/views/PopupView.d.ts +1 -1
  191. package/views/SceneView.js +1 -1
  192. package/views/ToolViewManager.js +1 -1
  193. package/views/interactive/options/TooltipVisibleElements.d.ts +11 -1
  194. package/views/interactive/options/TooltipVisibleElements.js +1 -1
  195. package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
  196. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  197. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  198. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  199. package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
  200. package/views/support/hitTestSelectUtils.js +1 -1
  201. package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
  202. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  203. package/widgets/BasemapToggle.js +1 -1
  204. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
  205. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  206. package/widgets/BatchAttributeForm.js +1 -1
  207. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
  208. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  209. package/widgets/DirectionalPad.js +1 -1
  210. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  211. package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
  212. package/widgets/Editor/workflowUtils.js +1 -1
  213. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  214. package/widgets/OrientedImageryViewer/utils.js +1 -1
  215. package/widgets/Popup/types.d.ts +0 -7
  216. package/widgets/Popup.d.ts +7 -7
  217. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
  218. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  219. package/widgets/TimeSlider.js +1 -1
  220. package/assets/esri/core/workers/chunks/0a2b7c691a577cb3d189.js +0 -1
  221. package/assets/esri/core/workers/chunks/2146c25c01c9fc11b16c.js +0 -1
  222. package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +0 -1
  223. package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +0 -1
  224. package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
  225. package/assets/esri/core/workers/chunks/6e75f09fb9452bd5f9fb.js +0 -1
  226. package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +0 -1
  227. package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +0 -1
  228. package/assets/esri/core/workers/chunks/82ce034b5ba54de9b970.js +0 -29
  229. package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +0 -1
  230. package/assets/esri/core/workers/chunks/c77496c350004ee66eb2.js +0 -1
  231. package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +0 -1
  232. package/assets/esri/core/workers/chunks/dc52e036547612949d32.js +0 -1
  233. package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +0 -1
  234. package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../core/Accessor.js";import{clock as o}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as n}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as h}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as v}from"./interactive/interactiveToolUtils.js";import{ToolViewManagerManipulatorState as d}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",_="tools",T=1e3;let f=class extends e{constructor(t){super(t),this._updatingHandles=new c,this._clock=o,this._manipulatorState=new d,this.tools=new i,this._interacting=!1,this._interactingTimeout=T,this._interactingTimeoutHandle=null}initialize(){this.addHandles([this.view.on(u,t=>{this._handleInputEvent(t)},h.TOOL),...p(this.tools),this.tools.on("before-add",({item:t})=>{this._updateToolEditableFlag(t)}),this.tools.on("before-remove",({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.activeTool=null,this.tools.drain(t=>t.destroy()),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy(),this._manipulatorState.destroy()}get _manipulatorStateEventArgs(){return{tools:this.tools,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view,multiTouchActive:this.view.inputManager?.multiTouchActive}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const e=this.activeTool;this._set("activeTool",t),null!=e&&e.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const o of this.tools){this._updateToolEditableFlag(o);const t=m(o);null!=this.activeTool&&t||this._manipulatorState.clearPointers(o,this._manipulatorStateEventArgs,!t)}}get cursor(){const t=this._manipulatorState.cursor;if(null!=t)return t;for(const e of this.tools)if(e.visible&&null!=e.cursor)return e.cursor;return null}get updating(){return this._updatingHandles.updating||this.tools.some(t=>t.updating)}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=n(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout(()=>this._interacting=!1,this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s(()=>{const{state:t}=this.view;return"camera"in t&&t.camera},()=>this._forEachManipulator(t=>t.onViewChange())),this.view.elevationProvider.on("elevation-change",t=>this._forEachManipulator(e=>e.onElevationChange(t)))],g):this.addHandles(s(()=>this.view.extent,()=>this._forEachManipulator(t=>t.onViewChange())))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){for(const e of this.tools)e.manipulators&&e.manipulators.forEach(({manipulator:o})=>t(o,e))}_handleInputEvent(t){let e=!1;const o={...t,stopPropagation:()=>{e=!0,t.stopPropagation()}};if(null!=this.activeTool)this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(o);else for(const i of this.tools)!e&&i.visible&&i.handleInputEvent(o);!e&&v(t)&&this.activeTool&&(t.stopPropagation(),t.preventDefault(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(o,this._manipulatorStateEventArgs),e||null==this.activeTool||this.activeTool.handleInputEventAfter(o),this._manipulatorState.handleHoverEvent(o,this.tools),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(_);for(const t of this.tools){if(t instanceof e){const e=s(()=>[t.cursor,t.visible,t.editable],()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)});this.addHandles(e,_)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",e=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,e.item.manipulator)}),t.manipulators.on("change",()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)})],_)}this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)}_updateToolEditableFlag(t){t.setEditableFlag?.(1,null==this.activeTool||t===this.activeTool)}_removeIncompleteTools(t){this.tools.filter(e=>(null==t||e!==t)&&!e.created&&e.removeIncompleteOnCancel).forEach(t=>{this.tools.remove(t)})}get test(){if("test"!==process.env.NODE_ENV)return;const t=this;return{setClock:t=>this._clock=t,set interactingTimeoutEnabled(e){t._interactingTimeout=e?T:0},get interactingTimeoutEnabled(){return 0!==t._interactingTimeout}}}};t([r({constructOnly:!0,nonNullable:!0})],f.prototype,"view",void 0),t([r({value:null})],f.prototype,"activeTool",null),t([r({readOnly:!0,type:i})],f.prototype,"tools",void 0),t([r()],f.prototype,"cursor",null),t([r({readOnly:!0})],f.prototype,"updating",null),t([r()],f.prototype,"_interacting",void 0),t([r({readOnly:!0})],f.prototype,"interacting",null),f=t([l("esri.views.ToolViewManager")],f);export{f as ToolViewManager,T as interactingTimeout};
2
+ import{__decorate as t}from"tslib";import e from"../core/Accessor.js";import{clock as o}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as n}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as h}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as v}from"./interactive/interactiveToolUtils.js";import{ToolViewManagerManipulatorState as d}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",_="tools",T=1e3;let f=class extends e{constructor(t){super(t),this._updatingHandles=new c,this._clock=o,this._manipulatorState=new d,this.tools=new i,this._interacting=!1,this._interactingTimeout=T,this._interactingTimeoutHandle=null}initialize(){this.addHandles([this.view.on(u,t=>{this._handleInputEvent(t)},h.TOOL),...p(this.tools),this.tools.on("before-add",({item:t})=>{this._updateToolEditableFlag(t)}),this.tools.on("before-remove",({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.activeTool=null,this.tools.drain(t=>t.destroy()),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy(),this._manipulatorState.destroy()}get _manipulatorStateEventArgs(){return{tools:this.tools,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view,multiTouchActive:this.view.inputManager?.multiTouchActive}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const e=this.activeTool;this._set("activeTool",t),null!=e&&e.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const o of this.tools){this._updateToolEditableFlag(o);const t=m(o);null!=this.activeTool&&t||this._manipulatorState.clearPointers(o,this._manipulatorStateEventArgs,!t)}}get cursor(){const t=this._manipulatorState.cursor;if(null!=t)return t;for(const e of this.tools)if(e.visible&&null!=e.cursor)return e.cursor;return null}get updating(){return this._updatingHandles.updating||this.tools.some(t=>t.updating)}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=n(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout(()=>this._interacting=!1,this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s(()=>{const{state:t}=this.view;return"camera"in t&&t.camera},()=>this._forEachManipulator(t=>t.onViewChange())),this.view.elevationProvider.on("elevation-change",t=>this._forEachManipulator(e=>e.onElevationChange(t)))],g):this.addHandles(s(()=>this.view.extent,()=>this._forEachManipulator(t=>t.onViewChange())))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){for(const e of this.tools)e.manipulators&&e.manipulators.forEach(({manipulator:o})=>t(o,e))}_handleInputEvent(t){let e=!1;v(t)&&this.activeTool&&t.preventDefault();const o={...t,stopPropagation:()=>{e=!0,t.stopPropagation()}};if(null!=this.activeTool)this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(o);else for(const i of this.tools)!e&&i.visible&&i.handleInputEvent(o);!e&&v(t)&&this.activeTool&&(t.stopPropagation(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(o,this._manipulatorStateEventArgs),e||null==this.activeTool||this.activeTool.handleInputEventAfter(o),this._manipulatorState.handleHoverEvent(o,this.tools),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(_);for(const t of this.tools){if(t instanceof e){const e=s(()=>[t.cursor,t.visible,t.editable],()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)});this.addHandles(e,_)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",e=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,e.item.manipulator)}),t.manipulators.on("change",()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)})],_)}this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)}_updateToolEditableFlag(t){t.setEditableFlag?.(1,null==this.activeTool||t===this.activeTool)}_removeIncompleteTools(t){this.tools.filter(e=>(null==t||e!==t)&&!e.created&&e.removeIncompleteOnCancel).forEach(t=>{this.tools.remove(t)})}get test(){if("test"!==process.env.NODE_ENV)return;const t=this;return{setClock:t=>this._clock=t,set interactingTimeoutEnabled(e){t._interactingTimeout=e?T:0},get interactingTimeoutEnabled(){return 0!==t._interactingTimeout}}}};t([r({constructOnly:!0,nonNullable:!0})],f.prototype,"view",void 0),t([r({value:null})],f.prototype,"activeTool",null),t([r({readOnly:!0,type:i})],f.prototype,"tools",void 0),t([r()],f.prototype,"cursor",null),t([r({readOnly:!0})],f.prototype,"updating",null),t([r()],f.prototype,"_interacting",void 0),t([r({readOnly:!0})],f.prototype,"interacting",null),f=t([l("esri.views.ToolViewManager")],f);export{f as ToolViewManager,T as interactingTimeout};
@@ -1,7 +1,7 @@
1
1
  import type Accessor from "../../../core/Accessor.js";
2
2
 
3
3
  /** @since 5.2 */
4
- export interface TooltipVisibleElementsProperties extends Partial<Pick<TooltipVisibleElements, "area" | "coordinates" | "direction" | "distance" | "elevation" | "header" | "helpMessage" | "orientation" | "radius" | "rotation" | "scale" | "size" | "totalLength">> {}
4
+ export interface TooltipVisibleElementsProperties extends Partial<Pick<TooltipVisibleElements, "area" | "coordinates" | "direction" | "distance" | "elevation" | "elevationMode" | "header" | "helpMessage" | "orientation" | "radius" | "rotation" | "scale" | "size" | "totalLength">> {}
5
5
 
6
6
  /**
7
7
  * The elements that are displayed within the tooltip while sketching, editing or placing analyses.
@@ -46,6 +46,16 @@ export default class TooltipVisibleElements extends Accessor {
46
46
  * @since 5.2
47
47
  */
48
48
  accessor elevation: boolean;
49
+ /**
50
+ * When set to `false`, the elevation mode icon and input control are not shown in the tooltip.
51
+ *
52
+ * > [!WARNING]
53
+ * > Setting `elevationMode` to `true` on the Editor and Sketch components has no effect.
54
+ *
55
+ * @default true
56
+ * @since 5.2
57
+ */
58
+ accessor elevationMode: boolean;
49
59
  /**
50
60
  * When set to `false`, the header at the top of the tooltip is not shown, when in input mode.
51
61
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import e from"../../../core/Accessor.js";import{property as t,subclass as l}from"../../../core/accessorSupport/decorators.js";let n=class extends e{constructor(o){super(o),this.area=!0,this.coordinates=!0,this.direction=!0,this.distance=!0,this.elevation=!0,this.header=!0,this.helpMessage=!1,this.orientation=!0,this.radius=!0,this.rotation=!0,this.scale=!0,this.size=!0,this.totalLength=!0}};o([t({type:Boolean,nonNullable:!0})],n.prototype,"area",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"coordinates",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"direction",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"distance",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"elevation",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"header",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"helpMessage",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"orientation",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"radius",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"rotation",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"scale",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"size",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"totalLength",void 0),n=o([l("esri.views.interactive.options.TooltipVisibleElements")],n);const i=n;export{i as default};
2
+ import{__decorate as o}from"tslib";import e from"../../../core/Accessor.js";import{property as t,subclass as l}from"../../../core/accessorSupport/decorators.js";let n=class extends e{constructor(o){super(o),this.area=!0,this.coordinates=!0,this.direction=!0,this.distance=!0,this.elevation=!0,this.elevationMode=!0,this.header=!0,this.helpMessage=!1,this.orientation=!0,this.radius=!0,this.rotation=!0,this.scale=!0,this.size=!0,this.totalLength=!0}};o([t({type:Boolean,nonNullable:!0})],n.prototype,"area",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"coordinates",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"direction",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"distance",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"elevation",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"elevationMode",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"header",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"helpMessage",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"orientation",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"radius",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"rotation",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"scale",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"size",void 0),o([t({type:Boolean,nonNullable:!0})],n.prototype,"totalLength",void 0),n=o([l("esri.views.interactive.options.TooltipVisibleElements")],n);const i=n;export{i as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{base as n}from"../css.js";import i from"../../../../widgets/Widget.js";import{loadCalciteComponents as d}from"../../../../widgets/support/componentsUtils.js";import{tsx as r}from"../../../../widgets/support/widget.js";const a=["absolute-height","on-the-ground","relative-to-ground","relative-to-scene"],s={"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 c=class extends i{constructor(){super(...arguments),this._dropdown=null,this._onSelect=e=>{const t=e.currentTarget.selectedItems[0]?.getAttribute("data-mode"),o=a.find(e=>e===t),n=this.context.elevationModeContext;try{o&&!n.disabled&&o!==n.mode&&n.onChange(o)}finally{for(const t of e.currentTarget.querySelectorAll("calcite-dropdown-item"))t.selected=t.getAttribute("data-mode")===n.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=>{"Escape"===e.key&&this._dropdown?.open&&(e.preventDefault(),e.stopPropagation(),this._dropdown.open=!1,this._dropdown.querySelector("calcite-button")?.setFocus())}}render(){const{context:e,mode:t}=this,o=e.elevationModeContext,i=e.messages.sketch.elevationModeSelect,d=o.mode,c=`${i.title}: ${i[d]}`;return r("div",null,"feedback"===t?r("span",{"aria-label":c,class:`${n}-elevation-mode__feedback`,"data-testid":"tooltip-elevation-mode-feedback",key:"feedback",role:"img",title:c},r("calcite-icon",{icon:s[d],scale:"s"})):r("calcite-dropdown",{afterCreate:this._onDropdownCreate,afterRemoved:this._onDropdownRemove,class:`${n}-elevation-mode__dropdown`,"data-testid":"tooltip-elevation-mode",key:"input",placement:"bottom-end",scale:"s",topLayerDisabled:e.topLayerDisabled,onCalciteDropdownSelect:this._onSelect},r("calcite-button",{appearance:"transparent","data-field-name":"elevation","data-testid":"tooltip-elevation-mode-trigger","data-tooltip-inline-control":"",disabled:o.disabled,iconStart:s[d],kind:"neutral",label:c,scale:"s",slot:"trigger",title:c}),r("calcite-dropdown-group",{selectionMode:"single"},a.map(e=>r("calcite-dropdown-item",{"data-mode":e,"data-testid":`tooltip-elevation-mode-${e}`,iconStart:s[e],key:e,selected:e===d},i[e])))))}loadDependencies(){return d({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()],c.prototype,"context",void 0),e([t()],c.prototype,"mode",void 0),c=e([o("esri.views.interactive.tooltip.components.ElevationModeSelect")],c);export{c as ElevationModeSelect};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{watch as e}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as i}from"../../../../core/scheduling.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{tooltipKeys as s}from"../../keybindings.js";import{notAvailableString as l}from"../constants.js";import{base as a}from"../css.js";import r from"../../../../widgets/Widget.js";import{loadCalciteComponents as c}from"../../../../widgets/support/componentsUtils.js";import{tsx as u,tsxFragment as d}from"../../../../widgets/support/widget.js";const p=`${a}-editable-field`,h={base:p,inputMode:`${p}--input`,feedbackMode:`${p}--feedback`,readOnly:`${p}--read-only`,locked:`${p}--locked`,title:`${p}__title`,value:`${p}__value`,valueContent:`${p}__value__content`,valueContentReadOnly:`${p}__value__content--read-only`,lockIcon:`${p}__lock-icon`,input:`${p}__input`,inputWrapper:`${p}__input-wrapper`,inputMessage:`${p}__input-message`,inputSuffix:`${p}__input-suffix`,button:`${p}__button`},_={lock:"lock",unlock:"unlock"};let m=class extends r{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.field.toggleLock(this.context)},this._onLockAfterCreate=t=>{this._lock=t},this._onLockAfterRemoved=()=>{this._lock=null},this._onKeyDown=t=>{t.key===s.discard&&"input"===this.mode&&this._input&&this.context.onDiscard(this._input)},this._onInputKeyDown=t=>{const e=this._input;if(e)switch(t.key){case s.commit:return this.field.onCommit("commit-and-exit",e,this.context);case s.next:{t.preventDefault(),t.stopPropagation();const i=t.shiftKey?"commit-and-previous":"commit-and-next";return this.field.onCommit(i,e,this.context)}}},this._onInput=t=>{this.field.onInput(t.currentTarget.value)},this._onInputBlur=t=>{const e=this._input;e&&t.relatedTarget!==this._lock&&this.field.onCommit("commit-on-blur",e,this.context)},this._selectText=()=>{const t=()=>{this._input!==document.activeElement&&this._input!==document.activeElement?.shadowRoot?.activeElement||this._input?.selectText()};t(),i().then(t)},this._onAfterCreate=t=>{this._input=t,t.addEventListener("paste",this._onPaste),t.addEventListener("beforeinput",this._onBeforeInput)},this._onAfterRemoved=t=>{t.removeEventListener("paste",this._onPaste),t.removeEventListener("beforeinput",this._onBeforeInput)},this._onPaste=t=>{const e=t.clipboardData?.getData("text");if(!e)return;null!=this.field.parse(e,this.context)&&(t.stopPropagation(),this.field.onInput(e))},this._onBeforeInput=t=>{("historyUndo"===t.inputType||"historyRedo"===t.inputType)&&!this.field.dirty&&t.preventDefault()}}initialize(){this.addHandles(e(()=>this._rawDisplayValue,()=>{const{committed:t,inputValue:e}=this.field;t||e||this._input!==document.activeElement||this._selectText()}))}loadDependencies(){return c({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message")})}render(){const{field:t,mode:e}=this,i="input"===e,{locked:n,readOnly:o}=t;return u("div",{class:this.classes({[h.base]:!0,[h.feedbackMode]:"feedback"===e,[h.inputMode]:"input"===e,[h.locked]:n,[h.readOnly]:o})},u("div",{class:h.title,key:"title"},this._title),u("div",{class:h.value,key:"value",onkeydown:this._onKeyDown},i?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||l}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){const{title:t}=this.field;return"string"==typeof t?t:t(this.context)}get _messages(){return this.context?.messages.sketch??{}}_renderValueFeedbackMode(){return u(d,null,u("div",{class:h.valueContent,key:"value-feedback"},this._formattedValue),this.field.locked&&"input"!==this.mode?u("calcite-icon",{class:h.lockIcon,icon:_.lock,key:"icon",scale:"s"}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return u("div",{class:this.classes(h.valueContent,h.valueContentReadOnly),key:"value-read-only"},this._formattedValue)}_renderValueWritable(){const{field:t}=this,e=this._messages,{name:i,invalid:n}=t;return u(d,null,u("div",{class:h.inputWrapper,key:"value-input"},u("calcite-input",{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:h.input,"data-field-name":i,"data-testid":`tooltip-field-${i}`,key:"input",scale:"s",status:n?"invalid":"idle",type:"text",value:this._rawDisplayValue??l,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown}),n?u("calcite-input-message",{class:h.inputMessage,scale:"s",status:"invalid"},e.invalidValue):null),u("div",{class:h.inputSuffix,key:"suffix"},this._suffix),this._renderedLockButton)}get _renderedLockButton(){const{lockDisabled:t,locked:e,lockable:i,name:n}=this.field;if(!i)return u("div",{key:"no-lock-button"});const o=this._messages,s=e?o.unlockConstraint:o.lockConstraint;return u("calcite-button",{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:"center",appearance:"transparent",class:h.button,"data-testid":`tooltip-field-${n}-lock`,disabled:t,iconStart:e?_.lock:_.unlock,key:"lock-button",kind:"neutral",label:s,scale:"s",tabIndex:-1,title:s,onclick:this._onLockClick})}};t([n()],m.prototype,"field",void 0),t([n()],m.prototype,"context",void 0),t([n()],m.prototype,"mode",void 0),t([n()],m.prototype,"_input",void 0),t([n()],m.prototype,"_lock",void 0),t([n()],m.prototype,"_formattedValue",null),t([n()],m.prototype,"_rawDisplayValue",null),t([n()],m.prototype,"_suffix",null),t([n()],m.prototype,"_title",null),t([n()],m.prototype,"_messages",null),t([n()],m.prototype,"_renderedLockButton",null),m=t([o("esri.views.interactive.tooltip.components.TooltipEditableField")],m);export{m as TooltipEditableField};
2
+ import{__decorate as t}from"tslib";import{watch as e}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as i}from"../../../../core/scheduling.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{tooltipKeys as s}from"../../keybindings.js";import{notAvailableString as l}from"../constants.js";import{base as a}from"../css.js";import{ElevationModeSelect as r}from"./ElevationModeSelect.js";import c from"../../../../widgets/Widget.js";import{loadCalciteComponents as u}from"../../../../widgets/support/componentsUtils.js";import{tsx as d,tsxFragment as p}from"../../../../widgets/support/widget.js";const h=`${a}-editable-field`,_={base:h,inputMode:`${h}--input`,feedbackMode:`${h}--feedback`,readOnly:`${h}--read-only`,locked:`${h}--locked`,title:`${h}__title`,value:`${h}__value`,valueContent:`${h}__value__content`,valueContentReadOnly:`${h}__value__content--read-only`,lockIcon:`${h}__lock-icon`,input:`${h}__input`,inputWrapper:`${h}__input-wrapper`,inputAction:`${h}__input-action`,inputMessage:`${h}__input-message`,inputSuffix:`${h}__input-suffix`,button:`${h}__button`},m={lock:"lock",unlock:"unlock"};let f=class extends c{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.field.toggleLock(this.context)},this._onLockAfterCreate=t=>{this._lock=t},this._onLockAfterRemoved=()=>{this._lock=null},this._onKeyDown=t=>{t.key===s.discard&&"input"===this.mode&&this._input&&this.context.onDiscard(this._input)},this._onInputKeyDown=t=>{const e=this._input;if(e&&t.target===e)switch(t.key){case s.commit:return this.field.onCommit("commit-and-exit",e,this.context);case s.next:{t.preventDefault(),t.stopPropagation();const i=t.shiftKey?"commit-and-previous":"commit-and-next";return this.field.onCommit(i,e,this.context)}}},this._onInput=t=>{this.field.onInput(t.currentTarget.value)},this._onInputBlur=t=>{const e=this._input;e&&t.relatedTarget!==this._lock&&this.field.onCommit("commit-on-blur",e,this.context)},this._selectText=()=>{const t=()=>{this._input!==document.activeElement&&this._input!==document.activeElement?.shadowRoot?.activeElement||this._input?.selectText()};t(),i().then(t)},this._onAfterCreate=t=>{this._input=t,t.addEventListener("paste",this._onPaste),t.addEventListener("beforeinput",this._onBeforeInput)},this._onAfterRemoved=t=>{t.removeEventListener("paste",this._onPaste),t.removeEventListener("beforeinput",this._onBeforeInput),this._input===t&&(this._input=null)},this._onPaste=t=>{const e=t.clipboardData?.getData("text");if(!e)return;null!=this.field.parse(e,this.context)&&(t.stopPropagation(),this.field.onInput(e))},this._onBeforeInput=t=>{("historyUndo"===t.inputType||"historyRedo"===t.inputType)&&!this.field.dirty&&t.preventDefault()}}initialize(){this.addHandles(e(()=>this._rawDisplayValue,()=>{const{committed:t,inputValue:e}=this.field;t||e||this._input!==document.activeElement||this._selectText()}))}loadDependencies(){return u({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message")})}render(){const{field:t,mode:e}=this,i="input"===e;return d("div",{class:this.classes({[_.base]:!0,[_.feedbackMode]:"feedback"===e,[_.inputMode]:"input"===e,[_.locked]:t.locked,[_.readOnly]:t.readOnly})},d("div",{class:_.title,key:"title"},this._title),d("div",{class:_.value,key:"value",onkeydown:this._onKeyDown},i?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||l}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){const{title:t}=this.field;return"string"==typeof t?t:t(this.context)}get _messages(){return this.context?.messages.sketch??{}}get _elevationModeSelect(){return"elevation"===this.field.name&&this.context.elevationModeContext&&this.context.toolOptions.tooltips.visibleElements.elevationMode?d(r,{context:this.context,key:"elevation-mode",mode:this.mode}):null}_renderValueFeedbackMode(){return d(p,null,d("div",{class:_.valueContent,key:"value-feedback"},this._formattedValue,this._elevationModeSelect),this.field.locked&&"input"!==this.mode?d("calcite-icon",{class:_.lockIcon,icon:m.lock,key:"icon",scale:"s"}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return d("div",{class:this.classes(_.valueContent,_.valueContentReadOnly),key:"value-read-only"},this._formattedValue,this._elevationModeSelect)}_renderValueWritable(){const{field:t}=this,e=this._messages,{name:i}=t,o=t.invalid;return d(p,null,d("div",{class:_.inputWrapper,key:"value-input"},d("calcite-input",{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:_.input,"data-field-id":t.id,"data-field-name":i,"data-testid":`tooltip-field-${i}`,key:"input",scale:"s",status:o?"invalid":"idle",type:"text",value:this._rawDisplayValue??l,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown},this._elevationModeSelect?d("div",{class:_.inputAction,slot:"action"},this._elevationModeSelect):null),o?d("calcite-input-message",{class:_.inputMessage,scale:"s",status:"invalid"},e.invalidValue):null),d("div",{class:_.inputSuffix,key:"suffix"},this._suffix),this._renderedLockButton)}get _renderedLockButton(){const{lockDisabled:t,locked:e,lockable:i,name:o}=this.field;if(!i)return d("div",{key:"no-lock-button"});const n=this._messages,s=e?n.unlockConstraint:n.lockConstraint;return d("calcite-button",{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:"center",appearance:"transparent",class:_.button,"data-testid":`tooltip-field-${o}-lock`,disabled:t,iconStart:e?m.lock:m.unlock,key:"lock-button",kind:"neutral",label:s,scale:"s",tabIndex:-1,title:s,onclick:this._onLockClick})}};t([o()],f.prototype,"field",void 0),t([o()],f.prototype,"context",void 0),t([o()],f.prototype,"mode",void 0),t([o()],f.prototype,"_input",void 0),t([o()],f.prototype,"_lock",void 0),t([o()],f.prototype,"_formattedValue",null),t([o()],f.prototype,"_rawDisplayValue",null),t([o()],f.prototype,"_suffix",null),t([o()],f.prototype,"_title",null),t([o()],f.prototype,"_messages",null),t([o()],f.prototype,"_elevationModeSelect",null),t([o()],f.prototype,"_renderedLockButton",null),f=t([n("esri.views.interactive.tooltip.components.TooltipEditableField")],f);export{f as TooltipEditableField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfNotAbortError as n,throwIfAborted as s,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as c}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as p,defaultVerticalLengthUnit as d,defaultLengthUnit as u}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as _}from"../../keybindings.js";import{table as g,contentHeader as y,contentHeaderSpacer as v,contentHeaderActions as b,contentInputMode as w,content as I,helpMessageText as A,helpMessageIcon as C,helpMessage as D,drawContentHeaderActions as M}from"../css.js";import{getFormatters as U}from"../fields/parsingAndFormattingUtils.js";import F from"../../../../widgets/Widget.js";import{loadCalciteComponents as j}from"../../../../widgets/support/componentsUtils.js";import{tsx as k,tsxFragment as x,classes as E,messageBundle as T}from"../../../../widgets/support/widget.js";const H=Symbol("dragHandles");let N=class extends F{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=i(U),this._onHeaderPointerDown=t=>{const e=t.target;if(!(e instanceof HTMLElement)||"calcite-button"===e?.tagName?.toLowerCase())return;this.removeHandles(H),t.preventDefault(),t.stopPropagation();const i="test"!==process.env.NODE_ENV;i&&e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)}),o(e,["pointerup","pointercancel"],o=>{this.removeHandles(H),i&&e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()}),o(e,"touchstart",t=>t.preventDefault())],H)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),i=o.length,n=o.indexOf(t);if(-1===n)return void this.exitInputMode();const s=((n+("commit-and-next"===e?1:-1))%i+i)%i;O(o.at(s))},this._onKeyDown=t=>{switch(t.code){case _.next:return this._onNextKey(t);case _.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.toolOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:c(t,e,"abbr")}),{inputUnits:o}=this.info.toolOptions.values,i=f(this.tooltip.view),n=o.length??i,s=o.verticalLength??i,r=o.area??i;return{length:e(u(n)),verticalLength:e(d(s)),area:e(p(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,toolOptions:this.info.toolOptions,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.toolOptions.tooltips,e=this._renderedContent,o=this._renderedActions,i=this._renderedHelpMessage,n=e.length>0,s=n||!!i,r="input"===this.mode;return k("div",{class:E(I,r&&w),tabIndex:-1,onkeydown:this._onKeyDown},r&&s&&t.header?k("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},k("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",scale:"s",tabIndex:-1,onclick:this._onDiscard}),o.length>0?k(x,null,k("div",{class:v,key:"spacer"}),k("div",{class:b,key:"actions"},o)):null):null,n?k("div",{class:g,key:"content"},...e):null,i)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return j({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){n(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const i=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),i instanceof HTMLElement&&i.focus()}catch(e){n(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),i=e.at(-1);o&&i&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),O(i)):document.activeElement===i&&(t.preventDefault(),t.stopPropagation(),O(o)))}get _renderedContent(){return S(this._renderContent())}get _renderedActions(){return S(this._renderActions())}get _renderedHelpMessage(){const{toolOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const i=t.tooltips.helpMessageIcon??"information";return k("div",{class:D,key:"help-message"},i?k("calcite-icon",{class:C,icon:i,scale:"s"}):null,k("div",{class:A},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),s(e);const o=this._getFocusableInputs(),i=t?o.find(e=>e.getAttribute("data-field-name")===t):o.at(0);await O(i)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const i=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if("test"===process.env.NODE_ENV||!this.domNode?.firstChild||!document.startViewTransition||e())return void await i();this.autoRenderingEnabled=!1;const n=this._transitionInfo={transition:document.startViewTransition(async()=>{this.destroyed||n!==this._transitionInfo||(this.autoRenderingEnabled=!0,await i())}),mode:t};try{await n.transition.finished}finally{n===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(P);await a()}_getFocusableInputs(){return Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[])}_getFocusableElements(){const t=this.domNode?.querySelector(`.${M}`);return[...Array.from(t?.querySelectorAll(`.${b} calcite-button:not([disabled])`)??[]),...this._getFocusableInputs()]}};async function O(t){await(t?.componentOnReady?.()),await(t?.setFocus())}function S(t){return(Array.isArray(t)?t:[t]).flat(10).filter(t=>!!t)}t([T("esri/core/t9n/Units"),h()],N.prototype,"_messagesUnits",void 0),t([T("esri/views/interactive/tooltip/t9n/Tooltip"),h()],N.prototype,"_messagesTooltip",void 0),t([h()],N.prototype,"info",void 0),t([h()],N.prototype,"tooltip",void 0),t([h()],N.prototype,"_mode",void 0),t([h()],N.prototype,"mode",null),t([h()],N.prototype,"_displayUnits",null),t([h()],N.prototype,"_inputUnitInfos",null),t([h()],N.prototype,"_formatters",null),t([h()],N.prototype,"fieldContext",null),t([h()],N.prototype,"_renderedContent",null),t([h()],N.prototype,"_renderedActions",null),t([h()],N.prototype,"_renderedHelpMessage",null),t([h()],N.prototype,"_defaultHelpMessage",null),N=t([m("esri.views.interactive.tooltip.content.TooltipContent")],N);const P=20;export{N as TooltipContent};
2
+ import{__decorate as t}from"tslib";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfNotAbortError as n,throwIfAborted as s,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as d}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as c,defaultVerticalLengthUnit as p,defaultLengthUnit as u}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as _}from"../../keybindings.js";import{table as g,contentHeader as y,contentHeaderSpacer as v,contentHeaderActions as b,contentInputMode as w,content as C,helpMessageText as I,helpMessageIcon as A,helpMessage as M,drawContentHeaderActions as x}from"../css.js";import{getFormatters as D}from"../fields/parsingAndFormattingUtils.js";import F from"../../../../widgets/Widget.js";import{loadCalciteComponents as U}from"../../../../widgets/support/componentsUtils.js";import{tsx as j,tsxFragment as k,classes as E,messageBundle as T}from"../../../../widgets/support/widget.js";const H=Symbol("dragHandles");let N=class extends F{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=i(D),this._onHeaderPointerDown=t=>{const e=t.target;if(!(e instanceof HTMLElement)||"calcite-button"===e?.tagName?.toLowerCase())return;this.removeHandles(H),t.preventDefault(),t.stopPropagation();const i="test"!==process.env.NODE_ENV;i&&e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)}),o(e,["pointerup","pointercancel"],o=>{this.removeHandles(H),i&&e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()}),o(e,"touchstart",t=>t.preventDefault())],H)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),i=o.length,n=o.indexOf(t);if(-1===n)return void this.exitInputMode();const s=((n+("commit-and-next"===e?1:-1))%i+i)%i;O(o.at(s))},this._onKeyDown=t=>{switch(t.code){case _.next:return this._onNextKey(t);case _.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.toolOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:d(t,e,"abbr")}),{inputUnits:o}=this.info.toolOptions.values,i=f(this.tooltip.view),n=o.length??i,s=o.verticalLength??i,r=o.area??i;return{length:e(u(n)),verticalLength:e(p(s)),area:e(c(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get _elevationModeContext(){const{elevationModeContext:t}=this.info;return t?{get mode(){return t.mode},get disabled(){return t.disabled},onChange:e=>{for(const t of this.info.editableFields){const e=this.domNode?.querySelector(`[data-field-id="${t.id}"]`);t.dirty&&e&&t.onCommit("commit-on-blur",e,this.fieldContext)}this.info.editableFields.some(t=>t.invalid)||t.onChange(e)}}:t}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,toolOptions:this.info.toolOptions,elevationModeContext:this._elevationModeContext,topLayerDisabled:this.topLayerDisabled,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.toolOptions.tooltips,e=this._renderedContent,o=this._renderedActions,i=this._renderedHelpMessage,n=e.length>0,s=n||!!i,r="input"===this.mode;return j("div",{class:E(C,r&&w),tabIndex:-1,onkeydown:this._onKeyDown},r&&s&&t.header?j("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},j("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",scale:"s",tabIndex:-1,onclick:this._onDiscard}),o.length>0?j(k,null,j("div",{class:v,key:"spacer"}),j("div",{class:b,key:"actions"},o)):null):null,n?j("div",{class:g,key:"content"},...e):null,i)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return U({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){n(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const i=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),i instanceof HTMLElement&&i.focus()}catch(e){n(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),i=e.at(-1);o&&i&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),O(i)):document.activeElement===i&&(t.preventDefault(),t.stopPropagation(),O(o)))}get _renderedContent(){return S(this._renderContent())}get _renderedActions(){return S(this._renderActions())}get _renderedHelpMessage(){const{toolOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const i=t.tooltips.helpMessageIcon??"information";return j("div",{class:M,key:"help-message"},i?j("calcite-icon",{class:A,icon:i,scale:"s"}):null,j("div",{class:I},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),s(e);const o=this._getFocusableFields(),i=t?o.find(e=>e.getAttribute("data-field-name")===t):o.at(0);await O(i)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const i=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if("test"===process.env.NODE_ENV||!this.domNode?.firstChild||!document.startViewTransition||e())return void await i();this.autoRenderingEnabled=!1;const n=this._transitionInfo={transition:document.startViewTransition(async()=>{this.destroyed||n!==this._transitionInfo||(this.autoRenderingEnabled=!0,await i())}),mode:t};try{await n.transition.finished}finally{n===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(L);await a()}_getFocusableFields(){return[...Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[]),...Array.from(this.domNode?.querySelectorAll("[data-tooltip-inline-control]:not([disabled])")??[])]}_getFocusableElements(){const t=this.domNode?.querySelector(`.${x}`);return[...Array.from(t?.querySelectorAll(`.${b} calcite-button:not([disabled])`)??[]),...this._getFocusableFields()]}};async function O(t){await(t?.componentOnReady?.()),await(t?.setFocus())}function S(t){return(Array.isArray(t)?t:[t]).flat(10).filter(t=>!!t)}t([T("esri/core/t9n/Units"),h()],N.prototype,"_messagesUnits",void 0),t([T("esri/views/interactive/tooltip/t9n/Tooltip"),h()],N.prototype,"_messagesTooltip",void 0),t([h()],N.prototype,"info",void 0),t([h()],N.prototype,"tooltip",void 0),t([h()],N.prototype,"_mode",void 0),t([h()],N.prototype,"mode",null),t([h()],N.prototype,"_displayUnits",null),t([h()],N.prototype,"_inputUnitInfos",null),t([h()],N.prototype,"_formatters",null),t([h()],N.prototype,"_elevationModeContext",null),t([h()],N.prototype,"fieldContext",null),t([h()],N.prototype,"_renderedContent",null),t([h()],N.prototype,"_renderedActions",null),t([h()],N.prototype,"_renderedHelpMessage",null),t([h()],N.prototype,"_defaultHelpMessage",null),N=t([m("esri.views.interactive.tooltip.content.TooltipContent")],N);const L=20;export{N as TooltipContent};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>n(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>r(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>r(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(n):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.toolOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function r(e,t){return e.displayOrder-t.displayOrder}function n(e){return"direction"!==e.name&&"distance"!==e.name}function a(e){return"x"!==e.name&&"y"!==e.name}function d(e,t){const{name:i,role:s}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==s))??[]}function p(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([i()],o.prototype,"type",void 0),e([i()],o.prototype,"getAllFields",void 0),e([i()],o.prototype,"getActiveHandle",void 0),e([i()],o.prototype,"getHelpMessageKey",void 0),e([i()],o.prototype,"availableFields",null),e([i()],o.prototype,"availableFieldsForCurrentHandle",null),e([i()],o.prototype,"allManagedFields",null),e([i()],o.prototype,"fieldsGroupedForDisplay",null),e([i()],o.prototype,"xyMode",null),e([i()],o.prototype,"allFields",null),e([i()],o.prototype,"renderContext",void 0),e([i()],o.prototype,"helpMessage",void 0),o=e([s("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],o);export{o as DynamicTooltipInfo,p as isKnownConstraintField};
2
+ import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>r(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>n(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>n(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(r):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}getConstraintFieldByName(e,t){return this.getConstraintFieldsForHandle(e).find(e=>e.name===t)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.toolOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function n(e,t){return e.displayOrder-t.displayOrder}function r(e){return"direction"!==e.name&&"distance"!==e.name}function a(e){return"x"!==e.name&&"y"!==e.name}function d(e,t){const{name:i,role:s}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==s))??[]}function p(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([i()],o.prototype,"type",void 0),e([i()],o.prototype,"getAllFields",void 0),e([i()],o.prototype,"getActiveHandle",void 0),e([i()],o.prototype,"getHelpMessageKey",void 0),e([i()],o.prototype,"availableFields",null),e([i()],o.prototype,"availableFieldsForCurrentHandle",null),e([i()],o.prototype,"allManagedFields",null),e([i()],o.prototype,"fieldsGroupedForDisplay",null),e([i()],o.prototype,"xyMode",null),e([i()],o.prototype,"allFields",null),e([i()],o.prototype,"renderContext",void 0),e([i()],o.prototype,"helpMessage",void 0),o=e([s("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],o);export{o as DynamicTooltipInfo,p as isKnownConstraintField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{property as o,subclass as l}from"../../../../core/accessorSupport/decorators.js";let i=class extends t{constructor(e){super(e),this.helpMessage=void 0,this.viewType=void 0}get visibleElements(){return this.toolOptions.tooltips.visibleElements}get allFields(){return[]}get editableFields(){return this.allFields.filter(e=>e.visible&&!e.readOnly)}clearInputValues(){this.allFields.forEach(e=>e.clearInputValue())}};e([o()],i.prototype,"toolOptions",void 0),e([o()],i.prototype,"visibleElements",null),e([o()],i.prototype,"helpMessage",void 0),e([o()],i.prototype,"viewType",void 0),e([o()],i.prototype,"allFields",null),e([o()],i.prototype,"editableFields",null),i=e([l("esri.views.interactive.tooltip.infos.SketchTooltipInfo")],i);export{i as SketchTooltipInfo};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{property as o,subclass as l}from"../../../../core/accessorSupport/decorators.js";let i=class extends t{constructor(e){super(e),this.helpMessage=void 0,this.viewType=void 0,this.elevationModeContext=null}get visibleElements(){return this.toolOptions.tooltips.visibleElements}get allFields(){return[]}get editableFields(){return this.allFields.filter(e=>e.visible&&!e.readOnly)}clearInputValues(){this.allFields.forEach(e=>e.clearInputValue())}};e([o()],i.prototype,"toolOptions",void 0),e([o()],i.prototype,"visibleElements",null),e([o()],i.prototype,"helpMessage",void 0),e([o()],i.prototype,"viewType",void 0),e([o()],i.prototype,"elevationModeContext",void 0),e([o()],i.prototype,"allFields",null),e([o()],i.prototype,"editableFields",null),i=e([l("esri.views.interactive.tooltip.infos.SketchTooltipInfo")],i);export{i as SketchTooltipInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- async function t(t,e){if("2d"===t.type)return t.hitTest(e);const r=await t.hitTest(e);if(0===r.results.length)return r;const s=r.results[0],u=(s.distance??0)*(1+n),i=r.results.findIndex(t=>(t.distance??0)>u);return-1!==i&&(r.results=r.results.slice(0,i)),s&&r.ground.distance>u&&(r.ground.mapPoint=null),r}const n=.05;function e(t){return"graphic"===t?.type}function r(t){return t.find(e)??null}function s(t){return t.filter(e)}export{s as filterGraphicHits,r as findFirstGraphicHit,t as hitTestSelectSimilarDistance};
2
+ import{isScreenRect as t}from"../../core/screenUtils.js";async function n(n,r){if("2d"===n.type||t(r))return n.hitTest(r);const s=await n.hitTest(r);if(0===s.results.length)return s;const i=s.results[0],u=(i.distance??0)*(1+e),c=s.results.findIndex(t=>(t.distance??0)>u);return-1!==c&&(s.results=s.results.slice(0,c)),i&&s.ground.distance>u&&(s.ground.mapPoint=null),s}const e=.05;function r(t){return"graphic"===t?.type}function s(t){return t.find(r)??null}function i(t){return t.filter(r)}export{i as filterGraphicHits,s as findFirstGraphicHit,n as hitTestSelectSimilarDistance};
@@ -20,6 +20,7 @@ export type BasemapToggleViewModelState = "ready" | "incompatible-next-basemap"
20
20
  * Use the [nextBasemap](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapToggle/BasemapToggleViewModel/#nextBasemap) property to determining the
21
21
  * secondary basemap to toggle to.
22
22
  *
23
+ * @deprecated since version 5.2. Use the [Basemap Toggle component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-toggle/) directly instead.
23
24
  * @since 4.0
24
25
  * @see [Basemap Toggle](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-toggle/) component
25
26
  * @see [BasemapToggle](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapToggle/) widget - _Deprecated since 4.32. Use the [Basemap Toggle component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-toggle/) instead._
@@ -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{watch as a,initial as i,whenOnce as s}from"../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{isLoaded as p,canProjectWithoutEngine as o,load as l}from"../../geometry/projectionUtils.js";import{equals as c}from"../../geometry/support/spatialReferenceUtils.js";import{basemapEnsureType as m}from"../../support/basemapEnsureType.js";import{findSpatialReference as f,getBasemapThumbnailUrl as d}from"../../support/basemapUtils.js";let u=class extends t{constructor(e){super(e),this._loadingProjectionEngine=!1,this.view=null,this.nextBasemap=m("hybrid")}initialize(){a(()=>this.nextBasemap,e=>{e&&!e.loaded&&e.load().catch(()=>{})},i)}destroy(){this.view=null}get _nextBasemapSpatialReferenceTask(){return f(this.view,this.nextBasemap)}get _viewSpatialReferenceLocked(){const{view:e}=this;return!e||!("spatialReferenceLocked"in e)||e.spatialReferenceLocked}get activeBasemap(){return m(this.view?.map?.basemap??"topo-vector")}get nextBasemap(){return this._get("nextBasemap")}set nextBasemap(e){this._set("nextBasemap",m(e))}get state(){const{view:e}=this;if(!e?.ready)return"disabled";if(this._nextBasemapSpatialReferenceTask.updating)return"disabled";const{spatialReference:t}=this._nextBasemapSpatialReferenceTask;return this._viewSpatialReferenceLocked&&null!=t&&!e.spatialReference.equals(t)?"incompatible-next-basemap":this._loadingProjectionEngine?"loading":"ready"}async toggle(){const{activeBasemap:e,nextBasemap:t,state:a,view:i}=this;if(!i||"disabled"===a||"incompatible-next-basemap"===a)return;const n=this._viewSpatialReferenceLocked;if(!n){if(await s(()=>!this._nextBasemapSpatialReferenceTask.updating),t!==this.nextBasemap||e!==this.activeBasemap)return;const{spatialReference:a}=this._nextBasemapSpatialReferenceTask;if(null==a||c(i.spatialReference,a)||p()||o(i.spatialReference,a)||(this._loadingProjectionEngine=!0,await l(),this._loadingProjectionEngine=!1),t!==this.nextBasemap||e!==this.activeBasemap)return}i.map.basemap=t,n||null==this._nextBasemapSpatialReferenceTask.spatialReference||c(i.spatialReference,this._nextBasemapSpatialReferenceTask.spatialReference)||(i.spatialReference=this._nextBasemapSpatialReferenceTask.spatialReference),this.nextBasemap=e}static getThumbnailUrl(e){return d(e)}};e([n()],u.prototype,"_loadingProjectionEngine",void 0),e([n({readOnly:!0})],u.prototype,"_nextBasemapSpatialReferenceTask",null),e([n({readOnly:!0})],u.prototype,"_viewSpatialReferenceLocked",null),e([n({readOnly:!0})],u.prototype,"activeBasemap",null),e([n()],u.prototype,"nextBasemap",null),e([n({readOnly:!0})],u.prototype,"state",null),e([n()],u.prototype,"view",void 0),e([n()],u.prototype,"toggle",null),u=e([r("esri.widgets.BasemapToggle.BasemapToggleViewModel")],u);const h=u;export{h as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as a}from"../../core/deprecate.js";import s from"../../core/Logger.js";import{watch as i,initial as r,whenOnce as n}from"../../core/reactiveUtils.js";import{property as p,subclass as o}from"../../core/accessorSupport/decorators.js";import{isLoaded as l,canProjectWithoutEngine as c,load as m}from"../../geometry/projectionUtils.js";import{equals as g}from"../../geometry/support/spatialReferenceUtils.js";import{basemapEnsureType as f}from"../../support/basemapEnsureType.js";import{findSpatialReference as d,getBasemapThumbnailUrl as u}from"../../support/basemapUtils.js";let h=class extends t{constructor(e){super(e),this._loadingProjectionEngine=!1,this.view=null,e?.suppressDeprecationWarning||a(s.getLogger(this),"Basemap Toggle","arcgis-basemap-toggle",{version:"5.2"}),this.nextBasemap=f("hybrid")}normalizeCtorArgs(e){const{suppressDeprecationWarning:t,...a}=e??{};return a}initialize(){i(()=>this.nextBasemap,e=>{e&&!e.loaded&&e.load().catch(()=>{})},r)}destroy(){this.view=null}get _nextBasemapSpatialReferenceTask(){return d(this.view,this.nextBasemap)}get _viewSpatialReferenceLocked(){const{view:e}=this;return!e||!("spatialReferenceLocked"in e)||e.spatialReferenceLocked}get activeBasemap(){return f(this.view?.map?.basemap??"topo-vector")}get nextBasemap(){return this._get("nextBasemap")}set nextBasemap(e){this._set("nextBasemap",f(e))}get state(){const{view:e}=this;if(!e?.ready)return"disabled";if(this._nextBasemapSpatialReferenceTask.updating)return"disabled";const{spatialReference:t}=this._nextBasemapSpatialReferenceTask;return this._viewSpatialReferenceLocked&&null!=t&&!e.spatialReference.equals(t)?"incompatible-next-basemap":this._loadingProjectionEngine?"loading":"ready"}async toggle(){const{activeBasemap:e,nextBasemap:t,state:a,view:s}=this;if(!s||"disabled"===a||"incompatible-next-basemap"===a)return;const i=this._viewSpatialReferenceLocked;if(!i){if(await n(()=>!this._nextBasemapSpatialReferenceTask.updating),t!==this.nextBasemap||e!==this.activeBasemap)return;const{spatialReference:a}=this._nextBasemapSpatialReferenceTask;if(null==a||g(s.spatialReference,a)||l()||c(s.spatialReference,a)||(this._loadingProjectionEngine=!0,await m(),this._loadingProjectionEngine=!1),t!==this.nextBasemap||e!==this.activeBasemap)return}s.map.basemap=t,i||null==this._nextBasemapSpatialReferenceTask.spatialReference||g(s.spatialReference,this._nextBasemapSpatialReferenceTask.spatialReference)||(s.spatialReference=this._nextBasemapSpatialReferenceTask.spatialReference),this.nextBasemap=e}static getThumbnailUrl(e){return u(e)}};e([p()],h.prototype,"_loadingProjectionEngine",void 0),e([p({readOnly:!0})],h.prototype,"_nextBasemapSpatialReferenceTask",null),e([p({readOnly:!0})],h.prototype,"_viewSpatialReferenceLocked",null),e([p({readOnly:!0})],h.prototype,"activeBasemap",null),e([p()],h.prototype,"nextBasemap",null),e([p({readOnly:!0})],h.prototype,"state",null),e([p()],h.prototype,"view",void 0),e([p()],h.prototype,"toggle",null),h=e([o("esri.widgets.BasemapToggle.BasemapToggleViewModel")],h);const B=h;export{B 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{deprecateWidget as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{property as i,cast as a,subclass as o}from"../core/accessorSupport/decorators.js";import{getBasemapThumbnailUrl as l}from"../support/basemapUtils.js";import r from"./Widget.js";import n from"./BasemapToggle/BasemapToggleViewModel.js";import{css as c}from"./BasemapToggle/css.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as m}from"./support/globalCss.js";import{messageBundle as d,tsx as g}from"./support/widget.js";function u(e){const t=l(e);return t?{backgroundImage:"url("+t+")"}:{backgroundImage:""}}const v={title:!1};let b=class extends r{constructor(e,i){super(e,i),this.messages=null,this.viewModel=new n,this.visibleElements={...v},this.toggle=()=>this.viewModel.toggle(),t(s.getLogger(this),"Basemap Toggle","arcgis-basemap-toggle",{version:"4.32"})}loadDependencies(){return p({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim")})}get activeBasemap(){return this.viewModel.activeBasemap}get icon(){return"layer-basemap"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get nextBasemap(){return this.viewModel.nextBasemap}set nextBasemap(e){this.viewModel.nextBasemap=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}castVisibleElements(e){return{...v,...e}}render(){const e=this.viewModel,t="disabled"===e.state?null:e.activeBasemap,s="disabled"===e.state?null:e.nextBasemap,i="loading"===e.state,a="incompatible-next-basemap"===e.state,o=s?.title??"",l=s&&"loaded"!==s.loadStatus;let r;const n=this.visibleElements.title&&o,p=a;return(n||p)&&(r=g("div",{class:c.overlay,key:"overlay"},n?g("span",{class:c.title,title:o},o):null,p?g("calcite-scrim",{class:c.overlayScrim,title:this.messages.incompatibleSpatialReference},g("calcite-icon",{icon:"exclamation-mark-triangle"})):null)),g("div",{class:this.classes(c.base,m.widget)},g("calcite-button",{appearance:"transparent","data-basemap-id":s?s.id:"",disabled:a,kind:"neutral",label:this.label,title:this.label,onclick:()=>{this.toggle()}},g("div",{class:this.classes(c.container,c.secondaryBasemapImage)},g("div",{class:c.image,styles:u(t)})),g("div",{class:c.container},g("div",{class:this.classes(c.image,l?c.imageLoading:null),styles:u(s)},l||i?g("calcite-scrim",null,g("span",{"aria-hidden":"true",class:m.loaderAnimation,role:"presentation"})):null),r)))}};e([i({readOnly:!0})],b.prototype,"activeBasemap",null),e([i()],b.prototype,"icon",null),e([i()],b.prototype,"label",null),e([i(),d("esri/widgets/BasemapToggle/t9n/BasemapToggle")],b.prototype,"messages",void 0),e([i()],b.prototype,"nextBasemap",null),e([i()],b.prototype,"view",null),e([i({type:n})],b.prototype,"viewModel",void 0),e([i()],b.prototype,"visibleElements",void 0),e([a("visibleElements")],b.prototype,"castVisibleElements",null),b=e([o("esri.widgets.BasemapToggle")],b);const h=b;export{h as default};
2
+ import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{property as i,cast as a,subclass as o}from"../core/accessorSupport/decorators.js";import{getBasemapThumbnailUrl as l}from"../support/basemapUtils.js";import r from"./Widget.js";import n from"./BasemapToggle/BasemapToggleViewModel.js";import{css as c}from"./BasemapToggle/css.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as m}from"./support/globalCss.js";import{messageBundle as d,tsx as g}from"./support/widget.js";function u(e){const t=l(e);return t?{backgroundImage:"url("+t+")"}:{backgroundImage:""}}const v={title:!1};let b=class extends r{constructor(e,i){super(e,i),this.messages=null,this.viewModel=new n({suppressDeprecationWarning:!0}),this.visibleElements={...v},this.toggle=()=>this.viewModel.toggle(),t(s.getLogger(this),"Basemap Toggle","arcgis-basemap-toggle",{version:"4.32"})}loadDependencies(){return p({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim")})}get activeBasemap(){return this.viewModel.activeBasemap}get icon(){return"layer-basemap"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get nextBasemap(){return this.viewModel.nextBasemap}set nextBasemap(e){this.viewModel.nextBasemap=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}castVisibleElements(e){return{...v,...e}}render(){const e=this.viewModel,t="disabled"===e.state?null:e.activeBasemap,s="disabled"===e.state?null:e.nextBasemap,i="loading"===e.state,a="incompatible-next-basemap"===e.state,o=s?.title??"",l=s&&"loaded"!==s.loadStatus;let r;const n=this.visibleElements.title&&o,p=a;return(n||p)&&(r=g("div",{class:c.overlay,key:"overlay"},n?g("span",{class:c.title,title:o},o):null,p?g("calcite-scrim",{class:c.overlayScrim,title:this.messages.incompatibleSpatialReference},g("calcite-icon",{icon:"exclamation-mark-triangle"})):null)),g("div",{class:this.classes(c.base,m.widget)},g("calcite-button",{appearance:"transparent","data-basemap-id":s?s.id:"",disabled:a,kind:"neutral",label:this.label,title:this.label,onclick:()=>{this.toggle()}},g("div",{class:this.classes(c.container,c.secondaryBasemapImage)},g("div",{class:c.image,styles:u(t)})),g("div",{class:c.container},g("div",{class:this.classes(c.image,l?c.imageLoading:null),styles:u(s)},l||i?g("calcite-scrim",null,g("span",{"aria-hidden":"true",class:m.loaderAnimation,role:"presentation"})):null),r)))}};e([i({readOnly:!0})],b.prototype,"activeBasemap",null),e([i()],b.prototype,"icon",null),e([i()],b.prototype,"label",null),e([i(),d("esri/widgets/BasemapToggle/t9n/BasemapToggle")],b.prototype,"messages",void 0),e([i()],b.prototype,"nextBasemap",null),e([i()],b.prototype,"view",null),e([i({type:n})],b.prototype,"viewModel",void 0),e([i()],b.prototype,"visibleElements",void 0),e([a("visibleElements")],b.prototype,"castVisibleElements",null),b=e([o("esri.widgets.BasemapToggle")],b);const h=b;export{h as default};
@@ -6,7 +6,7 @@ import type { AttachmentInputUnion } from "../../../form/elements/inputs/attachm
6
6
  import type { AttributeFormSupportedLayerUnion, PendingAttachmentEdits } from "../types.js";
7
7
  import type { ArcadeBatchFormCalculationContextInfo } from "../expressions/types.js";
8
8
  import type { EditableInputProperties } from "./EditableInput.js";
9
- import type { AttachmentEditState } from "./types.js";
9
+ import type { AttachmentEditState, AttachmentTypeCategory } from "./types.js";
10
10
  import type { AttachmentValidationCriterionKey, AttachmentValidationCriterionState } from "./support/attachmentValidationCriteriaState.js";
11
11
 
12
12
  /** @since 5.1 */
@@ -22,6 +22,8 @@ export interface AttachmentElementInputProperties extends EditableInputPropertie
22
22
  */
23
23
  export default class AttachmentElementInput extends EditableInput<any> {
24
24
  constructor(properties: AttachmentElementInputProperties);
25
+ /** @internal */
26
+ get addDisabled(): boolean;
25
27
  /**
26
28
  * Indicates whether all attachments for this input are visible on the default page.
27
29
  *
@@ -34,6 +36,8 @@ export default class AttachmentElementInput extends EditableInput<any> {
34
36
  get attachmentKeyword(): string | undefined;
35
37
  /** The attachments applicable to this input. */
36
38
  accessor attachments: AttachmentInfo[];
39
+ /** @internal */
40
+ get categories(): ReadonlySet<AttachmentTypeCategory>;
37
41
  /**
38
42
  * The attachments visible on the default page before showing the full attachments list action.
39
43
  *
@@ -49,6 +53,8 @@ export default class AttachmentElementInput extends EditableInput<any> {
49
53
  accessor displayCount: number;
50
54
  /** Indicates if the attachment filename should be displayed. */
51
55
  get displayFilename(): boolean | null | undefined;
56
+ /** @internal */
57
+ get effectiveAttachmentCount(): number;
52
58
  /**
53
59
  * The single feature associated with this attachment element.
54
60
  *
@@ -62,6 +68,8 @@ export default class AttachmentElementInput extends EditableInput<any> {
62
68
  get hasUnsupportedFileTypeValidationError(): boolean;
63
69
  /** The configured attachment input for this element. */
64
70
  get input(): AttachmentInputUnion | null | undefined;
71
+ /** @internal */
72
+ get isCaptureOnly(): boolean;
65
73
  /**
66
74
  * Identifies the single feature layer associated with this attachment element. The layer must support feature editing and field access.
67
75
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import o from"../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../core/MapUtils.js";import{abortMaybe as r}from"../../../../core/maybe.js";import{ignoreAbortErrors as n,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{validateDomainValue as p}from"../../../../layers/support/domainUtils.js";import{makeArcadeContext as h,castArcadeValue as d}from"../../expressions/expressionUtils.js";let f=class extends t{constructor(e){super(e),this.filterValue="",this._choices=[],this._choicesByCode=new Map,this._expressionTask=null,this._interactionActive=!1,this._updatingHandles=new u}destroy(){r(this._expressionTask),this._updatingHandles.destroy()}get arcadeContextInfo(){return this.fieldInput.expressionsManager.arcadeContext}get choices(){return this._choices}get evaluating(){return this._updatingHandles.updating}get inputValue(){if(this._interactionActive)return this.filterValue;const e=this.fieldInput.value;return null==e?"":this.getLabel(e)}get features(){return this.fieldInput.features}get filteredChoices(){const e=this.choices,t=this.filterValue.trim().toLocaleLowerCase();return t?e.filter((e,i)=>this._normalizedChoiceNames[i].includes(t)):e}get input(){return this.fieldInput.input}get _normalizedChoiceNames(){return this._choices.map(({code:e,name:t})=>`${t}\n${this.getLabel(e)}`.toLocaleLowerCase())}beginInteraction(){this._interactionActive||(this._interactionActive=!0,this.filterValue="",this.evaluateChoiceExpression())}getChoice(e){return this._choicesByCode.get(e)}getLabel(e){const t=this.fieldInput.domain;return"coded-value"===t?.type?t.getName(e)??this.getChoice(e)?.name??String(e):this.getChoice(e)?.name??String(e)}endInteraction(){this._interactionActive=!1,this.filterValue=""}async evaluateChoiceExpression(){this._expressionTask=r(this._expressionTask);const e=i(e=>this._evaluateChoiceExpression(e));this._expressionTask=e;try{return await n(this._updatingHandles.addPromise(e.promise))??this.choices}finally{this._expressionTask===e&&(this._expressionTask=null)}}async _evaluateChoiceExpression(e){const t=await(import("../../../../arcade/languageUtils.js"));a(e);const i=this.arcadeContextInfo,o=this.fieldInput.field,r=new Array(this.features.length),n=new Map;let c;this.features.forEach((t,o)=>{const a=this.fieldInput.template.getExpressionExecutorsForLayer(t.layer)?.choiceExpression;if(!a)return void(r[o]=[]);const l=h(i,t,e);c||(c=l.executeContext),s(n,a,()=>[]).push({index:o,variables:l.variables})});for(const[s,p]of n){const n=await s.executeAsyncBatch(p,({variables:e})=>e,c);a(e);for(let e=0;e<n.length;e++){const s=n[e];"rejected"!==s.status?r[p[e].index]=this._parseChoices(s.value,i,o,t):r[p[e].index]=[]}}const l=this.fieldInput.domain,u=y(g(r)).filter(({code:e})=>null===p(o,e,l));return this._choicesByCode=new Map(u.map(e=>[e.code,e])),this._choices=u,u}_parseChoices(e,t,i,o){if(!_(e,o))return C(this),[];const s=x(e,"choices"),r=o.isImmutableArray(s)?s.toArray():Array.isArray(s)?s:[],n=[];for(const a of r){if(!_(a,o)){C(this);continue}const e=x(a,"name"),s=x(a,"code");if("string"!=typeof e||void 0===s||o.isVoid(s)||o.isFunctionParameter(s)){C(this);continue}const r=d(s,i,t.timeZone,o);null!=r&&n.push({name:e,code:r})}return n}};e([c()],f.prototype,"arcadeContextInfo",null),e([c()],f.prototype,"choices",null),e([c()],f.prototype,"evaluating",null),e([c()],f.prototype,"inputValue",null),e([c()],f.prototype,"features",null),e([c({constructOnly:!0})],f.prototype,"fieldInput",void 0),e([c()],f.prototype,"filteredChoices",null),e([c()],f.prototype,"filterValue",void 0),e([c()],f.prototype,"input",null),e([c()],f.prototype,"_choices",void 0),e([c()],f.prototype,"_interactionActive",void 0),e([c()],f.prototype,"_normalizedChoiceNames",null),f=e([l("esri.widgets.BatchAttributeForm.inputs.support.DynamicChoiceController")],f);const m=f;function g(e){const[t,...i]=e;if(!t)return[];let o=t;for(const r of i.sort((e,t)=>e.length-t.length)){if(!r.length)return[];const e=new Map;for(const{code:t,name:i}of r)s(e,t,()=>new Set).add(i);if(o=o.filter(({code:t,name:i})=>e.get(t)?.has(i)),!o.length)break}return o}function y(e){const t=new Set;return e.filter(({code:e})=>!t.has(e)&&(t.add(e),!0))}function _(e,t){return t.isDictionary(e)&&"function"==typeof e.field&&"function"==typeof e.keys}function x(e,t){const i=e.keys().find(e=>e.toLowerCase()===t);return null==i?void 0:e.field(i)}function C(e){o.getLogger(e).error("Value returned by choice expression does not conform to specification.")}export{m as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import o from"../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../core/MapUtils.js";import{abortMaybe as r}from"../../../../core/maybe.js";import{ignoreAbortErrors as n,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{validateDomainValue as p}from"../../../../layers/support/domainUtils.js";import{makeArcadeContext as h,castArcadeValue as d}from"../../expressions/expressionUtils.js";let f=class extends t{constructor(e){super(e),this.filterValue="",this._choices=[],this._evaluated=!1,this._choicesByCode=new Map,this._expressionTask=null,this._interactionActive=!1,this._updatingHandles=new u}destroy(){r(this._expressionTask),this._updatingHandles.destroy()}get arcadeContextInfo(){return this.fieldInput.expressionsManager.arcadeContext}get choices(){return this._choices}get evaluating(){return this._updatingHandles.updating}get evaluated(){return this._evaluated}get inputValue(){if(this._interactionActive)return this.filterValue;const e=this.fieldInput.value;return null==e?"":this.getLabel(e)}get features(){return this.fieldInput.features}get filteredChoices(){const e=this.choices,t=this.filterValue.trim().toLocaleLowerCase();return t?e.filter((e,i)=>this._normalizedChoiceNames[i].includes(t)):e}get input(){return this.fieldInput.input}get _normalizedChoiceNames(){return this._choices.map(({code:e,name:t})=>`${t}\n${this.getLabel(e)}`.toLocaleLowerCase())}beginInteraction(){this._interactionActive||(this._interactionActive=!0,this.filterValue="",this.evaluateChoiceExpression())}getChoice(e){return this._choicesByCode.get(e)}getLabel(e){const t=this.fieldInput.domain;return"coded-value"===t?.type?t.getName(e)??this.getChoice(e)?.name??String(e):this.getChoice(e)?.name??String(e)}endInteraction(){this._interactionActive=!1,this.filterValue=""}async evaluateChoiceExpression(){this._expressionTask=r(this._expressionTask);const e=i(e=>this._evaluateChoiceExpression(e));this._expressionTask=e;try{return await n(this._updatingHandles.addPromise(e.promise))??this.choices}finally{this._expressionTask===e&&(this._expressionTask=null)}}async _evaluateChoiceExpression(e){const t=await(import("../../../../arcade/languageUtils.js"));a(e);const i=this.arcadeContextInfo,o=this.fieldInput.field,r=new Array(this.features.length),n=new Map;let c;this.features.forEach((t,o)=>{const a=this.fieldInput.template.getExpressionExecutorsForLayer(t.layer)?.choiceExpression;if(!a)return void(r[o]=[]);const l=h(i,t,e);c||(c=l.executeContext),s(n,a,()=>[]).push({index:o,variables:l.variables})});for(const[s,p]of n){const n=await s.executeAsyncBatch(p,({variables:e})=>e,c);a(e);for(let e=0;e<n.length;e++){const s=n[e];"rejected"!==s.status?r[p[e].index]=this._parseChoices(s.value,i,o,t):r[p[e].index]=[]}}const l=this.fieldInput.domain,u=y(g(r)).filter(({code:e})=>null===p(o,e,l));return this._choicesByCode=new Map(u.map(e=>[e.code,e])),this._choices=u,this._evaluated=!0,u}_parseChoices(e,t,i,o){if(!_(e,o))return x(this),[];const s=v(e,"choices"),r=o.isImmutableArray(s)?s.toArray():Array.isArray(s)?s:[],n=[];for(const a of r){if(!_(a,o)){x(this);continue}const e=v(a,"name"),s=v(a,"code");if("string"!=typeof e||void 0===s||o.isVoid(s)||o.isFunctionParameter(s)){x(this);continue}const r=d(s,i,t.timeZone,o);null!=r&&n.push({name:e,code:r})}return n}};e([c()],f.prototype,"arcadeContextInfo",null),e([c()],f.prototype,"choices",null),e([c()],f.prototype,"evaluating",null),e([c()],f.prototype,"evaluated",null),e([c()],f.prototype,"inputValue",null),e([c()],f.prototype,"features",null),e([c({constructOnly:!0})],f.prototype,"fieldInput",void 0),e([c()],f.prototype,"filteredChoices",null),e([c()],f.prototype,"filterValue",void 0),e([c()],f.prototype,"input",null),e([c()],f.prototype,"_choices",void 0),e([c()],f.prototype,"_evaluated",void 0),e([c()],f.prototype,"_interactionActive",void 0),e([c()],f.prototype,"_normalizedChoiceNames",null),f=e([l("esri.widgets.BatchAttributeForm.inputs.support.DynamicChoiceController")],f);const m=f;function g(e){const[t,...i]=e;if(!t)return[];let o=t;for(const r of i.sort((e,t)=>e.length-t.length)){if(!r.length)return[];const e=new Map;for(const{code:t,name:i}of r)s(e,t,()=>new Set).add(i);if(o=o.filter(({code:t,name:i})=>e.get(t)?.has(i)),!o.length)break}return o}function y(e){const t=new Set;return e.filter(({code:e})=>!t.has(e)&&(t.add(e),!0))}function _(e,t){return t.isDictionary(e)&&"function"==typeof e.field&&"function"==typeof e.keys}function v(e,t){const i=e.keys().find(e=>e.toLowerCase()===t);return null==i?void 0:e.field(i)}function x(e){o.getLogger(e).error("Value returned by choice expression does not conform to specification.")}export{m as default};