@arcgis/core 5.0.0-next.58 → 5.0.0-next.59

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 (279) hide show
  1. package/Graphic.d.ts +2 -2
  2. package/Viewpoint.d.ts +1 -1
  3. package/applications/Urban/meshUtils.d.ts +2 -2
  4. package/arcade.d.ts +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/0bd73a66baea2f52e8a6.js +1 -0
  7. package/assets/esri/core/workers/chunks/262c5794650853457acc.js +1 -0
  8. package/assets/esri/core/workers/chunks/55a9ea536c64976c3409.js +1 -0
  9. package/assets/esri/core/workers/chunks/{5f9e64f00329cb646f0c.js → 741d170187e58e81584d.js} +1 -1
  10. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  11. package/assets/esri/themes/base/widgets/_Attribution.scss +2 -2
  12. package/assets/esri/themes/dark/main.css +1 -1
  13. package/assets/esri/themes/light/main.css +1 -1
  14. package/assets/esri/themes/light/view.css +1 -1
  15. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  16. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  17. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  18. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  19. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  20. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  21. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  22. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  23. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  24. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  25. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  26. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  27. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  28. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  29. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  30. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  31. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  32. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  33. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  34. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  35. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  36. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  37. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  38. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  39. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  40. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  41. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  42. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  43. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  44. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  45. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  46. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  47. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  48. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  54. package/chunks/lerc-wasm.js +1 -1
  55. package/config.js +1 -1
  56. package/geometry/Extent.d.ts +1 -1
  57. package/geometry/Mesh.d.ts +2 -2
  58. package/geometry/SpatialReference.js +1 -1
  59. package/geometry/geometryEngine.d.ts +3 -3
  60. package/geometry/{geometryEngineInterfaces.d.ts → geometryEngineTypes.d.ts} +1 -1
  61. package/geometry/operators/affineTransformOperator.d.ts +3 -3
  62. package/geometry/operators/alphaShapeOperator.d.ts +1 -1
  63. package/geometry/operators/areaOperator.d.ts +1 -1
  64. package/geometry/operators/boundaryOperator.d.ts +3 -3
  65. package/geometry/operators/bufferOperator.d.ts +1 -1
  66. package/geometry/operators/centroidOperator.d.ts +1 -1
  67. package/geometry/operators/clipOperator.d.ts +3 -3
  68. package/geometry/operators/containsOperator.d.ts +1 -1
  69. package/geometry/operators/convexHullOperator.d.ts +3 -3
  70. package/geometry/operators/crossesOperator.d.ts +1 -1
  71. package/geometry/operators/cutOperator.d.ts +2 -2
  72. package/geometry/operators/densifyOperator.d.ts +3 -3
  73. package/geometry/operators/differenceOperator.d.ts +3 -3
  74. package/geometry/operators/disjointOperator.d.ts +1 -1
  75. package/geometry/operators/distanceOperator.d.ts +1 -1
  76. package/geometry/operators/equalsOperator.d.ts +1 -1
  77. package/geometry/operators/generalizeOperator.d.ts +3 -3
  78. package/geometry/operators/geodesicBufferOperator.d.ts +1 -2
  79. package/geometry/operators/geodesicProximityOperator.d.ts +2 -5
  80. package/geometry/operators/geodeticAreaOperator.d.ts +1 -2
  81. package/geometry/operators/geodeticDensifyOperator.d.ts +3 -4
  82. package/geometry/operators/geodeticDistanceOperator.d.ts +1 -2
  83. package/geometry/operators/geodeticLengthOperator.d.ts +1 -2
  84. package/geometry/operators/geodeticUtilsOperator.d.ts +1 -1
  85. package/geometry/operators/graphicBufferOperator.d.ts +1 -1
  86. package/geometry/operators/integrateOperator.d.ts +2 -2
  87. package/geometry/operators/intersectionOperator.d.ts +3 -3
  88. package/geometry/operators/intersectsOperator.d.ts +1 -1
  89. package/geometry/operators/isNearOperator.d.ts +1 -1
  90. package/geometry/operators/labelPointOperator.d.ts +1 -1
  91. package/geometry/operators/lengthOperator.d.ts +1 -1
  92. package/geometry/operators/linesToPolygonsOperator.d.ts +1 -1
  93. package/geometry/operators/locateBetweenOperator.d.ts +2 -2
  94. package/geometry/operators/minimumBoundingCircleOperator.d.ts +1 -1
  95. package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
  96. package/geometry/operators/offsetOperator.d.ts +3 -3
  97. package/geometry/operators/overlapsOperator.d.ts +1 -1
  98. package/geometry/operators/projectOperator.d.ts +4 -6
  99. package/geometry/operators/proximityOperator.d.ts +2 -2
  100. package/geometry/operators/relateOperator.d.ts +1 -1
  101. package/geometry/operators/shapePreservingProjectOperator.d.ts +3 -3
  102. package/geometry/operators/simplifyOGCOperator.d.ts +3 -3
  103. package/geometry/operators/simplifyOperator.d.ts +3 -3
  104. package/geometry/operators/symmetricDifferenceOperator.d.ts +3 -3
  105. package/geometry/operators/touchesOperator.d.ts +1 -1
  106. package/geometry/operators/{support/proximityResult.d.ts → types.d.ts} +18 -3
  107. package/geometry/operators/unionOperator.d.ts +3 -3
  108. package/geometry/operators/withinOperator.d.ts +1 -1
  109. package/geometry/support/geodesicUtils.d.ts +15 -2
  110. package/geometry/support/jsonUtils.d.ts +1 -1
  111. package/geometry/support/meshUtils/types.d.ts +34 -0
  112. package/geometry/support/meshUtils.d.ts +4 -7
  113. package/geometry/support/webMercatorUtils.d.ts +1 -1
  114. package/geometry/types.d.ts +23 -1
  115. package/geometry.d.ts +1 -1
  116. package/interfaces.d.ts +69 -72
  117. package/kernel.js +1 -1
  118. package/layers/CSVLayer.d.ts +0 -2
  119. package/layers/CatalogLayer.d.ts +1 -1
  120. package/layers/FeatureLayer.d.ts +1 -1
  121. package/layers/GeoJSONLayer.d.ts +1 -1
  122. package/layers/OGCFeatureLayer.d.ts +1 -1
  123. package/layers/OrientedImageryLayer.d.ts +1 -3
  124. package/layers/ParquetLayer.d.ts +1 -1
  125. package/layers/WFSLayer.d.ts +1 -1
  126. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  127. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  128. package/layers/mixins/APIKeyMixin.d.ts +2 -2
  129. package/layers/mixins/ArcGISImageService.d.ts +4 -3
  130. package/layers/mixins/BlendLayer.d.ts +16 -15
  131. package/layers/mixins/DisplayFilteredLayer.d.ts +6 -3
  132. package/layers/mixins/FeatureEffectLayer.d.ts +23 -21
  133. package/layers/mixins/FeatureLayerBase.d.ts +23 -20
  134. package/layers/mixins/ImageryTileMixin.d.ts +5 -5
  135. package/layers/mixins/PortalLayer.d.ts +7 -7
  136. package/layers/mixins/RasterPresetRendererMixin.d.ts +6 -3
  137. package/layers/mixins/SceneService.d.ts +2 -2
  138. package/layers/mixins/TemporalLayer.d.ts +8 -7
  139. package/layers/mixins/TemporalSceneLayer.d.ts +2 -2
  140. package/layers/mixins/TrackableLayer.d.ts +4 -4
  141. package/layers/ogc/wfsUtils.d.ts +1 -1
  142. package/layers/raster/formats/Lerc.js +1 -1
  143. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +2 -2
  144. package/layers/support/DisplayFilterInfo.d.ts +7 -7
  145. package/layers/support/FeatureReductionCluster.d.ts +5 -5
  146. package/layers/support/FieldsIndex.d.ts +1 -2
  147. package/layers/support/RasterBandInfo.d.ts +1 -1
  148. package/layers/support/RasterInfo.d.ts +2 -2
  149. package/layers/support/RasterSensorInfo.d.ts +1 -1
  150. package/layers/support/Sublayer.d.ts +3 -3
  151. package/layers/support/SubtypeSublayer.d.ts +1 -1
  152. package/layers/support/TrackInfo.d.ts +2 -2
  153. package/layers/support/arcgisLayerUrl.js +1 -1
  154. package/layers/support/fieldUtils.d.ts +0 -1
  155. package/layers/support/source/QueryTableDataSource.d.ts +2 -2
  156. package/layers/support/types.d.ts +2 -2
  157. package/layers/types.d.ts +1 -1
  158. package/package.json +1 -1
  159. package/popup/FieldInfo.d.ts +8 -8
  160. package/popup/content/AttachmentsContent.d.ts +2 -2
  161. package/popup/content/CustomContent.d.ts +1 -1
  162. package/portal/interfaces.d.ts +2 -2
  163. package/portal/support/resourceUtils.d.ts +6 -7
  164. package/rest/featureService/types.d.ts +1 -1
  165. package/rest/geometryService.d.ts +2 -2
  166. package/rest/imageService.d.ts +1 -1
  167. package/rest/knowledgeGraph/GraphAnyValue.d.ts +1 -1
  168. package/rest/query/support/AttachmentInfo.d.ts +1 -1
  169. package/rest/query.d.ts +1 -1
  170. package/rest/support/BufferParameters.d.ts +1 -1
  171. package/rest/support/DataLayer.d.ts +1 -1
  172. package/rest/support/DensifyParameters.d.ts +1 -1
  173. package/rest/support/DistanceParameters.d.ts +1 -1
  174. package/rest/support/FeatureSet.d.ts +2 -2
  175. package/rest/support/FindImagesParameters.d.ts +1 -1
  176. package/rest/support/GeneralizeParameters.d.ts +1 -1
  177. package/rest/support/IdentifyParameters.d.ts +1 -1
  178. package/rest/support/ImageGPSInfoParameters.d.ts +1 -1
  179. package/rest/support/ImageMeasureResultAreaValue.d.ts +1 -1
  180. package/rest/support/ImageToMapMultirayParameters.d.ts +1 -1
  181. package/rest/support/OffsetParameters.d.ts +1 -1
  182. package/rest/support/ProjectParameters.d.ts +1 -1
  183. package/rest/support/Query.d.ts +1 -1
  184. package/rest/support/QueryMixin.d.ts +1 -1
  185. package/rest/support/RelationParameters.d.ts +1 -1
  186. package/rest/support/RelationshipQuery.d.ts +1 -1
  187. package/rest/support/TopFeaturesQuery.d.ts +1 -1
  188. package/smartMapping/labels/bins.d.ts +3 -6
  189. package/smartMapping/labels/clusters.d.ts +2 -2
  190. package/smartMapping/popup/clusters.d.ts +4 -4
  191. package/smartMapping/popup/templates.d.ts +4 -4
  192. package/smartMapping/renderers/color.d.ts +6 -6
  193. package/smartMapping/renderers/size.d.ts +6 -6
  194. package/smartMapping/statistics/support/ageUtils.d.ts +5 -5
  195. package/smartMapping/statistics/types.d.ts +5 -5
  196. package/smartMapping/types.d.ts +9 -1
  197. package/support/revision.js +1 -1
  198. package/unionTypes.d.ts +1 -1
  199. package/views/2d/MapViewConstraints.d.ts +5 -4
  200. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  201. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  202. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  203. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  204. package/views/BreakpointsOwner.d.ts +1 -1
  205. package/views/LinkChartView.d.ts +1 -2
  206. package/views/MapView.d.ts +1 -2
  207. package/views/SceneView.d.ts +1 -2
  208. package/views/View.d.ts +1 -1
  209. package/views/Viewport2DMixin.d.ts +1 -1
  210. package/views/draw/MultipointDrawAction.d.ts +1 -1
  211. package/views/draw/MultipointDrawAction.js +1 -1
  212. package/views/draw/PointDrawAction.d.ts +1 -1
  213. package/views/draw/PointDrawAction.js +1 -1
  214. package/views/draw/PolygonDrawAction.d.ts +1 -1
  215. package/views/draw/PolygonDrawAction.js +1 -1
  216. package/views/draw/PolylineDrawAction.d.ts +1 -1
  217. package/views/draw/PolylineDrawAction.js +1 -1
  218. package/views/draw/SegmentDrawAction.d.ts +1 -1
  219. package/views/draw/SegmentDrawAction.js +1 -1
  220. package/views/input/{IViewEvents.js → mouseButtons.js} +1 -1
  221. package/views/input/types.d.ts +602 -1
  222. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  223. package/views/layers/FeatureLayerViewMixin.d.ts +1 -1
  224. package/views/layers/ImageryLayerViewMixin.d.ts +1 -1
  225. package/views/layers/MediaLayerViewMixin.d.ts +1 -1
  226. package/views/layers/PointCloudLayerView.d.ts +1 -1
  227. package/views/layers/SceneLayerView.d.ts +2 -2
  228. package/views/types.d.ts +148 -2
  229. package/webdoc/geotriggersInfo/FeatureFilter.d.ts +1 -1
  230. package/webscene/support/FeatureReferenceObjectId.d.ts +1 -1
  231. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -2
  232. package/widgets/BasemapLayerList.d.ts +3 -4
  233. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -1
  234. package/widgets/CatalogLayerList.d.ts +2 -4
  235. package/widgets/Directions/DirectionsViewModel.d.ts +1 -1
  236. package/widgets/Editor/types.d.ts +1 -1
  237. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +2 -2
  238. package/widgets/FeatureTable/VisibleElements.d.ts +30 -9
  239. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +1 -1
  240. package/widgets/FeatureTable/support/interfaces.d.ts +2 -2
  241. package/widgets/FeatureTable.d.ts +4 -4
  242. package/widgets/LayerList/LayerListViewModel.d.ts +9 -10
  243. package/widgets/LayerList/ListItem.d.ts +9 -11
  244. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  245. package/widgets/LayerList.d.ts +7 -4
  246. package/widgets/Legend/LegendViewModel.d.ts +5 -5
  247. package/widgets/Legend/support/ActiveLayerInfo.d.ts +5 -5
  248. package/widgets/Legend.d.ts +4 -4
  249. package/widgets/Popup/types.d.ts +3 -3
  250. package/widgets/Popup.d.ts +3 -3
  251. package/widgets/TableList/TableListViewModel.d.ts +2 -4
  252. package/widgets/TableList.d.ts +1 -1
  253. package/widgets/UtilityNetworkTrace/types.d.ts +1 -1
  254. package/assets/esri/core/workers/chunks/052ded41dc06c93ec0a7.js +0 -1
  255. package/assets/esri/core/workers/chunks/a1f264abbd6354c333bf.js +0 -1
  256. package/assets/esri/core/workers/chunks/ed38c1043e6a83f49f93.js +0 -1
  257. package/geometry/geodesicUtils.d.ts +0 -19
  258. package/geometry/operators/support/geodeticCurveType.d.ts +0 -2
  259. package/geometry/operators/support/projectionTransformation.d.ts +0 -16
  260. package/geometry/support/MeshVertexSpace.d.ts +0 -4
  261. package/geometry/support/meshUtils/elevation.d.ts +0 -16
  262. package/geometry/support/meshUtils/elevationSampler.d.ts +0 -9
  263. package/geometry/support/meshUtils/georeference.d.ts +0 -10
  264. package/geometry/support/typeUtils.d.ts +0 -16
  265. package/smartMapping/popup/support/utils.d.ts +0 -13
  266. package/smartMapping/support/binningUtils.d.ts +0 -11
  267. package/smartMapping/support/clusterUtils.d.ts +0 -11
  268. package/smartMapping/support/utils.d.ts +0 -4
  269. package/views/2d/constraints/GeometryConstraint.d.ts +0 -4
  270. package/views/HitTestItem3D.d.ts +0 -20
  271. package/views/HitTestOptions.d.ts +0 -25
  272. package/views/IBreakpointsOwner.d.ts +0 -55
  273. package/views/IObjectId.d.ts +0 -2
  274. package/views/ISceneView.d.ts +0 -5
  275. package/views/IView.d.ts +0 -43
  276. package/views/input/IViewEvents.d.ts +0 -602
  277. /package/views/draw/input/{CursorUpdateEvents.d.ts → CursorUpdateEvent.d.ts} +0 -0
  278. /package/views/draw/input/{CursorUpdateEvents.js → CursorUpdateEvent.js} +0 -0
  279. /package/views/layers/{HighlightableLayerView.d.ts → types.d.ts} +0 -0
@@ -1,602 +0,0 @@
1
- import type Layer from "../../layers/Layer.js";
2
- import type Point from "../../geometry/Point.js";
3
- import type LayerView from "../layers/LayerView.js";
4
- import type { PointerType } from "./types.js";
5
-
6
- export type PointerEventType = "pointer-down" | "pointer-move" | "pointer-up" | "pointer-drag" | "pointer-enter" | "pointer-leave";
7
-
8
- /**
9
- * Indicates which mouse button was clicked.
10
- * See [MouseEvent.button](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button).
11
- *
12
- * Value | Description
13
- * ------|------------
14
- * 0 | left click (or touch)
15
- * 1 | middle click
16
- * 2 | right click
17
- * 3 | back click
18
- * 4 | forward click
19
- * -1 | unknown button
20
- */
21
- export type MouseButton = 0 | 1 | 2 | 3 | 4 | -1;
22
-
23
- export interface ViewEvent<T extends Event = Event> {
24
- /**
25
- * A function that can be called to defer event propagation until
26
- * the passed in asynchronous function is completed. Calling defer will stall the entire event pipeline and should
27
- * be used with caution.
28
- */
29
- defer: EventDefer;
30
- /** A standard [DOM Event](https://developer.mozilla.org/en-US/docs/Web/API/Event). */
31
- native: T;
32
- /** Time stamp (in milliseconds) at which the event was created. */
33
- timestamp: number;
34
- /** Prevents the event bubbling up the event chain. */
35
- stopPropagation(): void;
36
- }
37
-
38
- /**
39
- * @param operation - An asynchronous operation.
40
- * @returns The result of calling the passed in operation.
41
- * @since 4.33
42
- * @example
43
- * view.on("click", (event) => {
44
- * event.defer(async () => {
45
- * const hitTestResult = await view.hitTest(event);
46
- *
47
- * if (hitTestResult.results.length) {
48
- * // stop the event from propagating
49
- * event.stopPropagation();
50
- * console.log("found hit, stopping propagation to prevent popup", hitTestResult.results[0]);
51
- * }
52
- * });
53
- * });
54
- */
55
- export type EventDefer = <T>(operation: () => Promise<T>) => Promise<T>;
56
-
57
- /**
58
- * Aynchronous function passed to the defer method of an event.
59
- *
60
- * @returns The event pipeline is deferred until the promise is resolved.
61
- * @since 4.33
62
- * @see [EventDefer](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-input-IViewEvents.html#EventDefer)
63
- */
64
- export type EventDeferredOperation<T extends Event = Event> = () => Promise<T>;
65
-
66
- export type PointerId = number;
67
-
68
- export interface ClickEvent extends ViewEvent<PointerEvent | MouseEvent> {
69
- /** Indicates which mouse button was clicked. */
70
- button: MouseButton;
71
- /**
72
- * Indicates the current mouse button state.
73
- *
74
- * Value | Description
75
- * ------|------------
76
- * 0 | left click (or touch)
77
- * 1 | middle click
78
- * 2 | right click
79
- */
80
- buttons: number;
81
- /**
82
- * The point location of the click on the view in the spatial
83
- * reference of the map.
84
- */
85
- mapPoint: Point;
86
- /** The event type. */
87
- type: "click";
88
- /** The horizontal screen coordinate of the click on the view. */
89
- x: number;
90
- /** The vertical screen coordinate of the click on the view. */
91
- y: number;
92
- }
93
-
94
- export interface DoubleClickEvent extends ViewEvent<PointerEvent | MouseEvent> {
95
- /** Indicates which mouse button was clicked. */
96
- button: MouseButton;
97
- /**
98
- * Indicates the current mouse button state.
99
- *
100
- * Value | Description
101
- * ------|------------
102
- * 0 | left click (or touch)
103
- * 1 | middle click
104
- * 2 | right click
105
- */
106
- buttons: number;
107
- /**
108
- * The point location of the click on the view in the spatial
109
- * reference of the map.
110
- */
111
- mapPoint: Point;
112
- /** The event type. */
113
- type: "double-click";
114
- /** The horizontal screen coordinate of the click on the view. */
115
- x: number;
116
- /** The vertical screen coordinate of the click on the view. */
117
- y: number;
118
- }
119
-
120
- export interface ImmediateClickEvent extends ViewEvent<PointerEvent | MouseEvent> {
121
- /**
122
- * Indicates which mouse button was clicked.
123
- * See [MouseEvent.button](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button).
124
- *
125
- * Value | Description
126
- * ------|------------
127
- * 0 | left click (or touch)
128
- * 1 | middle click
129
- * 2 | right click
130
- */
131
- button: MouseButton;
132
- /**
133
- * Indicates which buttons are pressed when the event is triggered.
134
- * See [MouseEvent.buttons](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons).
135
- */
136
- buttons: number;
137
- /**
138
- * The point location of the click on the view in the spatial
139
- * reference of the map.
140
- */
141
- mapPoint: Point;
142
- /** The event type. */
143
- type: "immediate-click";
144
- /** The horizontal screen coordinate of the click on the view. */
145
- x: number;
146
- /** The vertical screen coordinate of the click on the view. */
147
- y: number;
148
- }
149
-
150
- export interface ImmediateDoubleClickEvent extends ViewEvent<PointerEvent | MouseEvent> {
151
- /**
152
- * Indicates which mouse button was clicked.
153
- * See [MouseEvent.button](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button).
154
- *
155
- * Value | Description
156
- * ------|------------
157
- * 0 | left click (or touch)
158
- * 1 | middle click
159
- * 2 | right click
160
- */
161
- button: MouseButton;
162
- /**
163
- * Indicates which buttons are pressed when the event is triggered.
164
- * See [MouseEvent.buttons](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons).
165
- */
166
- buttons: number;
167
- /**
168
- * The point location of the click on the view in the spatial
169
- * reference of the map.
170
- */
171
- mapPoint: Point;
172
- /** The event type. */
173
- type: "immediate-double-click";
174
- /** The horizontal screen coordinate of the click on the view. */
175
- x: number;
176
- /** The vertical screen coordinate of the click on the view. */
177
- y: number;
178
- }
179
-
180
- export interface HoldEvent extends ViewEvent<PointerEvent | MouseEvent> {
181
- /**
182
- * Indicates which mouse button was held down.
183
- * See [MouseEvent.button](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button).
184
- *
185
- * Value | Description
186
- * ------|------------
187
- * 0 | left mouse button (or touch)
188
- * 1 | middle mouse button
189
- * 2 | right mouse button
190
- */
191
- button: MouseButton;
192
- /**
193
- * Indicates which mouse buttons are pressed when the event is triggered.
194
- * See [MouseEvent.buttons](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons).
195
- */
196
- buttons: number;
197
- /**
198
- * The point location of the click on the view in the spatial
199
- * reference of the map.
200
- */
201
- mapPoint: Point;
202
- /** The event type. */
203
- type: "hold";
204
- /** The horizontal screen coordinate of the hold on the view. */
205
- x: number;
206
- /** The vertical screen coordinate of the hold on the view. */
207
- y: number;
208
- }
209
-
210
- export interface DragEvent extends ViewEvent<PointerEvent | MouseEvent> {
211
- /**
212
- * Indicates the state of the drag.
213
- * The two values `added` and `removed` indicate a change in the number of pointers involved.
214
- */
215
- action: "start" | "update" | "added" | "removed" | "end";
216
- /** Amount of rotation (in degrees) since the last event of type `start`. */
217
- angle: number;
218
- /**
219
- * Indicates which mouse button was clicked at the start of the drag.
220
- * See [MouseEvent.button](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button).
221
- *
222
- * Value | Description
223
- * ------|------------
224
- * 0 | left mouse button (or touch)
225
- * 1 | middle mouse button
226
- * 2 | right mouse button
227
- */
228
- button: MouseButton;
229
- /**
230
- * Indicates which mouse buttons are pressed when the event is triggered.
231
- * See [MouseEvent.buttons](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons).
232
- */
233
- buttons: number;
234
- /** Screen coordinates of the start of the drag. */
235
- origin: DragEventOrigin;
236
- /** The radius of a sphere around the multiple pointers involved in this drag. Or 0 while only a single pointer is used. */
237
- radius: number;
238
- /** The event type. */
239
- type: "drag";
240
- /** The horizontal screen coordinate of the pointer on the view. */
241
- x: number;
242
- /** The vertical screen coordinate of the pointer on the view. */
243
- y: number;
244
- }
245
-
246
- export interface DragEventOrigin {
247
- /** The horizontal screen coordinate of the pointer on the view. */
248
- x: number;
249
- /** The vertical screen coordinate of the pointer on the view. */
250
- y: number;
251
- }
252
-
253
- export interface KeyDownEvent extends ViewEvent<KeyboardEvent> {
254
- /**
255
- * The key value that was pressed, according to the
256
- * [MDN full list of key values](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values).
257
- */
258
- key: string;
259
- /**
260
- * Indicates whether this is the first event emitted
261
- * due to the key press, or a repeat.
262
- */
263
- repeat: boolean;
264
- /** The event type. */
265
- type: "key-down";
266
- }
267
-
268
- export interface KeyUpEvent extends ViewEvent<KeyboardEvent> {
269
- /**
270
- * The key value that was released, according to the
271
- * [MDN full list of key values](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values).
272
- */
273
- key: string;
274
- /** The event type. */
275
- type: "key-up";
276
- }
277
-
278
- export interface PointerEventCommon extends ViewEvent<PointerEvent> {
279
- /** Indicates which mouse button was clicked. */
280
- button: MouseButton;
281
- /**
282
- * Indicates which mouse buttons are pressed when the event is triggered.
283
- * See [MouseEvent.buttons](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons).
284
- */
285
- buttons: number;
286
- /**
287
- * Uniquely identifies a pointer between multiple down, move, and up events.
288
- * Ids might get reused after a pointer-up event.
289
- */
290
- pointerId: PointerId;
291
- /** Indicates the pointer type. */
292
- pointerType: PointerType;
293
- /** The horizontal screen coordinate of the pointer on the view. */
294
- x: number;
295
- /** The vertical screen coordinate of the pointer on the view. */
296
- y: number;
297
- }
298
-
299
- export interface PointerDownEvent extends PointerEventCommon {
300
- /** The event type. */
301
- type: "pointer-down";
302
- }
303
-
304
- export interface PointerMoveEvent extends PointerEventCommon {
305
- /** The event type. */
306
- type: "pointer-move";
307
- }
308
-
309
- export interface PointerUpEvent extends PointerEventCommon {
310
- /** The event type. */
311
- type: "pointer-up";
312
- }
313
-
314
- export interface PointerEnterEvent extends PointerEventCommon {
315
- /** The event type. */
316
- type: "pointer-enter";
317
- }
318
-
319
- export interface PointerLeaveEvent extends PointerEventCommon {
320
- /** The event type. */
321
- type: "pointer-leave";
322
- }
323
-
324
- export interface ViewMouseWheelEvent extends ViewEvent<WheelEvent> {
325
- /** Number representing the vertical scroll amount. */
326
- deltaY: number;
327
- /** The event type. */
328
- type: "mouse-wheel";
329
- /** The horizontal screen coordinate of the click on the view. */
330
- x: number;
331
- /** The vertical screen coordinate of the click on the view. */
332
- y: number;
333
- }
334
-
335
- export interface ViewFocusEvent extends ViewEvent<FocusEvent> {}
336
-
337
- export interface ViewBlurEvent extends ViewEvent<FocusEvent> {}
338
-
339
- export interface ViewResizeEvent {
340
- /** The new measured view height in pixels */
341
- height: number;
342
- /** The previous view height in pixels */
343
- oldHeight: number;
344
- /** The previous view width in pixels */
345
- oldWidth: number;
346
- /** The new measured view width in pixels */
347
- width: number;
348
- }
349
-
350
- export interface LayerViewCreateEvent {
351
- /** The layer in the map for which the `layerView` was created. */
352
- layer: Layer;
353
- /**
354
- * The LayerView rendered
355
- * in the view representing the layer in `layer`.
356
- */
357
- layerView: LayerView;
358
- }
359
-
360
- export interface LayerViewCreateErrorEvent {
361
- /** An error object describing why the layer view could not be created. */
362
- error: Error;
363
- /**
364
- * The layer in the map for which the view emitting this event
365
- * failed to create a layer view.
366
- */
367
- layer: Layer;
368
- }
369
-
370
- export interface LayerViewDestroyEvent {
371
- /** The layer in the map for which the `layerView` was destroyed. */
372
- layer: Layer;
373
- /** The LayerView that was destroyed in the view. */
374
- layerView: LayerView;
375
- }
376
-
377
- export interface ViewBaseEventTypes {
378
- /**
379
- * Fires after each layer in the map has a corresponding [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) created
380
- * and rendered in the view.
381
- *
382
- * @see [View#whenLayerView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#whenLayerView)
383
- * @example
384
- * // This function fires each time a layer view is created for a layer in
385
- * // the map of the view.
386
- * view.on("layerview-create", function(event) {
387
- * // The event contains the layer and its layer view that has just been
388
- * // created. Here we check for the creation of a layer view for a layer with
389
- * // a specific id, and log the layer view
390
- * if (event.layer.id === "satellite") {
391
- * // The LayerView for the desired layer
392
- * console.log(event.layerView);
393
- * }
394
- * });
395
- */
396
- "layerview-create": LayerViewCreateEvent;
397
- /**
398
- * Fires when an error occurs during the creation of a [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html)
399
- * after a layer has been added to the map.
400
- *
401
- * @see [View#whenLayerView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#whenLayerView)
402
- * @example
403
- * // This function fires each time an error occurs during the creation of a layerview
404
- * view.on("layerview-create-error", function(event) {
405
- * console.error("LayerView failed to create for layer with the id: ", event.layer.id);
406
- * });
407
- */
408
- "layerview-create-error": LayerViewCreateErrorEvent;
409
- /**
410
- * Fires after a [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) is destroyed and is
411
- * no longer rendered in the view. This happens for example when a layer is
412
- * removed from the map of the view.
413
- */
414
- "layerview-destroy": LayerViewDestroyEvent;
415
- /**
416
- * Fires when the view's size changes.
417
- *
418
- * @see [MapView#size](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#size)
419
- * @see [MapView#height](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#height)
420
- * @see [MapView#width](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#width)
421
- */
422
- resize: ViewResizeEvent;
423
- }
424
-
425
- export interface ViewEventTypes extends ViewBaseEventTypes {
426
- /**
427
- * Fires when browser focus is moved away from the view.
428
- *
429
- * @since 4.7
430
- */
431
- blur: ViewBlurEvent;
432
- /**
433
- * Fires after a user clicks on the view. This event emits slightly slower than an
434
- * [View#@immediate-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-immediate-click) event to make sure that a [View#@double-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-double-click)
435
- * event isn't triggered instead. The [View#@immediate-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-immediate-click) event can be used
436
- * for responding to a click event without delay.
437
- *
438
- * @see [Sample: Access features with click events](https://developers.arcgis.com/javascript/latest/sample-code/view-hittest/)
439
- * @example
440
- * view.on("click", function(event){
441
- * // event is the event object returned after the event fires
442
- *
443
- * // Prints the map coordinates of the clicked location
444
- * console.log(event.mapPoint);
445
- * });
446
- * @example
447
- * // Set up a click event handler and retrieve the screen point
448
- * view.on("click", function(event) {
449
- * // the hitTest() checks to see if any graphics in the view
450
- * // intersect the given screen x, y coordinates
451
- * view.hitTest(event)
452
- * .then(getGraphics);
453
- * });
454
- * @example
455
- * view.on("click", function(event) {
456
- * // you must overwrite default click-for-popup
457
- * // behavior to display your own popup
458
- * view.popupEnabled = false;
459
- *
460
- * // Get the coordinates of the click on the view
461
- * let lat = Math.round(event.mapPoint.latitude * 1000) / 1000;
462
- * let lon = Math.round(event.mapPoint.longitude * 1000) / 1000;
463
- *
464
- * view.popup.open({
465
- * // Set the popup's title to the coordinates of the location
466
- * title: "Reverse geocode: [" + lon + ", " + lat + "]",
467
- * location: event.mapPoint // Set the location of the popup to the clicked location
468
- * content: "This is a point of interest" // content displayed in the popup
469
- * });
470
- * });
471
- */
472
- click: ClickEvent;
473
- /**
474
- * Fires after double-clicking on the view.
475
- *
476
- * @example
477
- * view.on("double-click", function(event) {
478
- * // The event object contains the mapPoint and the screen coordinates of the location
479
- * // that was clicked.
480
- * console.log("screen point", event.x, event.y);
481
- * console.log("map point", event.mapPoint);
482
- * });
483
- */
484
- "double-click": DoubleClickEvent;
485
- /**
486
- * Fires during a pointer drag on the view.
487
- *
488
- * @example
489
- * view.on("drag", function(event){
490
- * // Print out the current state of the
491
- * // drag event.
492
- * console.log("drag state", event.action);
493
- * });
494
- */
495
- drag: DragEvent;
496
- /**
497
- * Fires when browser focus is on the view.
498
- *
499
- * @since 4.7
500
- */
501
- focus: ViewFocusEvent;
502
- /**
503
- * Fires after holding either a mouse button or a single finger on the view for a short amount of time.
504
- *
505
- * @example
506
- * view.on("hold", function(event) {
507
- * // The event object contains the mapPoint and the screen coordinates of the location
508
- * // that was clicked.
509
- * console.log("hold at screen point", event.x, event.y);
510
- * console.log("hold at map point", event.mapPoint);
511
- * });
512
- */
513
- hold: HoldEvent;
514
- /**
515
- * Fires right after a user clicks on the view. In contrast to the [View#@click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-click) event,
516
- * the `immediate-click` event is emitted as soon as the user clicks on
517
- * the view, and is not inhibited by a [View#@double-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-double-click) event. This event
518
- * is useful for interactive experiences that require feedback without delay.
519
- *
520
- * @since 4.7
521
- * @example
522
- * // Set up an immediate-click event handler and retrieve the screen point
523
- * view.on("immediate-click", function(event) {
524
- * // the hitTest() checks to see if any graphics in the view
525
- * // intersect the given screen x, y coordinates
526
- * view.hitTest(event)
527
- * .then(getGraphics);
528
- * });
529
- */
530
- "immediate-click": ImmediateClickEvent;
531
- /**
532
- * Is emitted after two consecutive [View#@immediate-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-immediate-click) events.
533
- * In contrast to [View#@double-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-double-click), an `immediate-double-click` cannot
534
- * be prevented by use of `stopPropagation` on the [View#@immediate-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-immediate-click)
535
- * event and can therefore be used to react to double-clicking independently of usage of the
536
- * [View#@immediate-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-immediate-click) event.
537
- *
538
- * @since 4.15
539
- */
540
- "immediate-double-click": ImmediateDoubleClickEvent;
541
- /**
542
- * Fires after a keyboard key is pressed.
543
- *
544
- * @example
545
- * // Zoom in when user clicks on "a" button
546
- * // Zoom out when user clicks on "s" button
547
- * view.on("key-down", function(event){
548
- * console.log("key-down", event);
549
- *
550
- * if (event.key === "a"){
551
- * let zm = view.zoom + 1;
552
- *
553
- * view.goTo({
554
- * target: view.center,
555
- * zoom: zm
556
- * });
557
- * }
558
- * else if(event.key == "s"){
559
- * let zm = view.zoom - 1;
560
- *
561
- * view.goTo({
562
- * target: view.center,
563
- * zoom: zm
564
- * });
565
- * }
566
- * });
567
- */
568
- "key-down": KeyDownEvent;
569
- /** Fires after a keyboard key is released. */
570
- "key-up": KeyUpEvent;
571
- /**
572
- * Fires when a wheel button of a pointing device (typically a mouse) is scrolled on the view.
573
- *
574
- * @example
575
- * view.on("mouse-wheel", function(event){
576
- * // deltaY value is positive when wheel is scrolled up
577
- * // and it is negative when wheel is scrolled down.
578
- * console.log(event.deltaY);
579
- * });
580
- */
581
- "mouse-wheel": ViewMouseWheelEvent;
582
- /** Fires after a mouse button is pressed, or a finger touches the display. */
583
- "pointer-down": PointerDownEvent;
584
- /** Fires after a mouse cursor enters the view, or a display touch begins. */
585
- "pointer-enter": PointerEnterEvent;
586
- /** Fires after a mouse cursor leaves the view, or a display touch ends. */
587
- "pointer-leave": PointerLeaveEvent;
588
- /**
589
- * Fires after the mouse or a finger on the display moves.
590
- *
591
- * @example
592
- * // Fires `pointer-move` event when user clicks on "Shift"
593
- * // key and moves the pointer on the view.
594
- * view.on('pointer-move', ["Shift"], function(event){
595
- * let point = view.toMap({x: event.x, y: event.y});
596
- * bufferPoint(point);
597
- * });
598
- */
599
- "pointer-move": PointerMoveEvent;
600
- /** Fires after a mouse button is released, or a display touch ends. */
601
- "pointer-up": PointerUpEvent;
602
- }