@arcgis/core 5.2.0-next.60 → 5.2.0-next.62

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 (66) hide show
  1. package/applications/Components/imageryUtils.d.ts +10 -0
  2. package/applications/Components/imageryUtils.js +1 -1
  3. package/arcgisGlobal.d.ts +2 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{3abc12d2407e4214963d.js → 13033178de9f637a2356.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{d205edd949f3e6e24eb9.js → 147a89553188cc6aabf4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{3157f85bb319294878ca.js → 1b68b1b724ad30396723.js} +2 -2
  8. package/assets/esri/core/workers/chunks/{127b111ee53e4b9184f8.js → 4dcd4a052b40047a9230.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{aaa66a04b882b0ba2961.js → 5600fc334d20c4f0c83d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{14c066c31fe37b7f6e63.js → 638ed1297efdb24f4711.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{42692a4ce3fb364e321e.js → 763cbb6716e398436a6d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{d6aad815fc0ee8e24bb5.js → 7ce52b850dd785bfa33f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{81659d121ed732bda907.js → a12803108c3b12808698.js} +2 -2
  14. package/assets/esri/core/workers/chunks/{5527b2da4abe0faa98bb.js → a494abeb026d536d9fae.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{498d29e8c8be4a12ba12.js → b958f87f23f984131d09.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{4e2f3dd158a5228c87ba.js → c85ba0700eafdc8d6f9e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{edf87407dd20685c82ab.js → e287113777a94ded8de6.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a615a644086e98a90579.js → f4891345507df63cff3c.js} +2 -2
  19. package/assets/esri/core/workers/chunks/{4fb549f11e176fc2f24a.js → f7fa932ade85cb2847b6.js} +1 -1
  20. package/config.js +1 -1
  21. package/core/screenUtils.js +1 -1
  22. package/geometry/support/intersectsBase.js +1 -1
  23. package/interfaces.d.ts +14 -0
  24. package/kernel.js +1 -1
  25. package/package.json +3 -3
  26. package/popup/FeatureContent.d.ts +311 -0
  27. package/popup/FeatureContent.js +2 -0
  28. package/popup/FeatureContentCollection.d.ts +569 -0
  29. package/popup/FeatureContentCollection.js +2 -0
  30. package/support/revision.js +1 -1
  31. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  32. package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
  33. package/views/2d/layers/BaseLayerViewGL2D.d.ts +2 -2
  34. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  35. package/views/2d/support/hitTestUtils.js +1 -1
  36. package/views/3d/layers/FlowSubView3D.js +1 -1
  37. package/views/3d/layers/I3SMeshView3D.js +1 -1
  38. package/views/3d/layers/MediaLayerView3D.js +1 -1
  39. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  40. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  41. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  42. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  43. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  44. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  45. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  46. package/views/3d/support/buffer/glUtil.js +1 -1
  47. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  48. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  49. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  50. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  51. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  52. package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
  53. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +11 -11
  54. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  55. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  56. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  57. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  58. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  59. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  60. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  61. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  62. package/views/View2D.d.ts +2 -2
  63. package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
  64. package/views/webgl/FramebufferObject.js +1 -1
  65. package/widgets/Legend/support/heatmapRampUtils.js +1 -1
  66. /package/assets/esri/core/workers/chunks/{81659d121ed732bda907.js.LICENSE.txt → a12803108c3b12808698.js.LICENSE.txt} +0 -0
@@ -0,0 +1,569 @@
1
+ import type Graphic from "../Graphic.js";
2
+ import type EsriMap from "../Map.js";
3
+ import type Collection from "../core/Collection.js";
4
+ import type Point from "../geometry/Point.js";
5
+ import type SpatialReference from "../geometry/SpatialReference.js";
6
+ import type FeatureContent from "./FeatureContent.js";
7
+ import type FeatureAbilities from "./support/FeatureAbilities.js";
8
+ import type { EventedAccessor } from "../core/Evented.js";
9
+ import type { ScreenPoint } from "../core/types.js";
10
+ import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
11
+ import type { FetchFeaturesOptions, InitialDisplayOptions, PopupAction, State } from "./types.js";
12
+ import type { TimeZone } from "../time/types.js";
13
+ import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
14
+ import type { FetchPopupFeaturesResult } from "../views/types.js";
15
+ import type { GoTo, GoToProperties } from "../widgets/support/GoTo.js";
16
+ import type { GoToParameters } from "../widgets/support/types.js";
17
+ import type { ActionToggleProperties } from "../support/actions/ActionToggle.js";
18
+ import type { ActionButtonProperties } from "../support/actions/ActionButton.js";
19
+ import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
20
+ import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js";
21
+ import type { PointProperties } from "../geometry/Point.js";
22
+
23
+ /** @internal */
24
+ export interface FeatureContentCollectionProperties extends GoToProperties, Partial<Pick<FeatureContentCollection, "activeFeature" | "aggregatedFeaturesEnabled" | "content" | "defaultPopupTemplateEnabled" | "featurePage" | "features" | "featuresPerPage" | "heading" | "highlightEnabled" | "includeDefaultActions" | "initialDisplayMode" | "map" | "open" | "promises" | "selectedFeatureIndex" | "updateLocationEnabled" | "view" | "zoomFactor">> {
25
+ /**
26
+ * [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.
27
+ * Each action may be executed by clicking the icon or image symbolizing them.
28
+ * By default, a `Zoom To` action styled with a magnifying glass icon is included.
29
+ * When this icon is clicked, the view zooms in four LODs and centers on the selected feature.
30
+ *
31
+ * This default action can be removed by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#includeDefaultActions) to `false`, or by setting the
32
+ * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
33
+ * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
34
+ *
35
+ * @internal
36
+ * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
37
+ * @example
38
+ * ```js
39
+ * // Defines an action button to zoom out from the selected feature
40
+ * const zoomOutAction = new ActionButton({
41
+ * title: "Zoom out",
42
+ * // The ID by which to reference the action in the event handler
43
+ * id: "zoom-out",
44
+ * // Sets the icon used to style the action button
45
+ * icon: "magnifying-glass-minus"
46
+ * });
47
+ * // Adds the custom action to the popup.
48
+ * featuresModel.actions.push(zoomOutAction);
49
+ * ```
50
+ */
51
+ actions?: ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>;
52
+ /**
53
+ * Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that can be used when querying and displaying content.
54
+ *
55
+ * @internal
56
+ */
57
+ featureItemAbilities?: FeatureAbilitiesProperties | null;
58
+ /**
59
+ * Geometry used to show the location of the feature. This is automatically set when selecting a feature. If displaying content not related
60
+ * to features in the map, such as the results from a task, then you must set this
61
+ * property before setting [open](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#open) to `true`.
62
+ *
63
+ * @internal
64
+ * @see [Get started with popups](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/)
65
+ * @example
66
+ * // Sets the location to the center of the view
67
+ * featuresItem.location = view.center;
68
+ * featuresItem.open = true;
69
+ * @example
70
+ * // Display the featuresItem when and where the user clicks the view.
71
+ * reactiveUtils.on(()=>view, "click", ({ mapPoint })=>{
72
+ * featuresItem.location = mapPoint;
73
+ * featuresItem.open = true;
74
+ * });
75
+ */
76
+ location?: PointProperties | null;
77
+ /**
78
+ * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
79
+ * This property should be set if Arcade expressions are executed that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
80
+ *
81
+ * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#view) property can be used to provide the spatial reference instance for this property.
82
+ *
83
+ * @internal
84
+ * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
85
+ * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
86
+ */
87
+ spatialReference?: SpatialReferenceProperties | null;
88
+ /**
89
+ * Dates and times will be displayed in this time zone. By default this time zone is
90
+ * inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#view) property is set. When a MapView is not associated, then the property will fallback to the `system` time zone.
91
+ *
92
+ * **Possible Values**
93
+ *
94
+ * Value | Description |
95
+ * ----- | ----------- |
96
+ * system | Dates and times will be displayed in the timezone of the device or browser.
97
+ * unknown | Dates and time are not adjusted for any timezone.
98
+ * Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
99
+ *
100
+ * @internal
101
+ */
102
+ timeZone?: TimeZone | null;
103
+ }
104
+
105
+ /**
106
+ * Provides reactive state and behavior for the [Features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/) component, including fetching and paging popup features, tracking selection, and coordinating highlighting and actions.
107
+ *
108
+ * @internal
109
+ * @since 5.1
110
+ * @see [Features component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/)
111
+ * @see [Popup component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/)
112
+ * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
113
+ */
114
+ export default class FeatureContentCollection extends FeatureContentCollectionSuperclass {
115
+ /** @internal */
116
+ constructor(properties?: FeatureContentCollectionProperties);
117
+ /**
118
+ * [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.
119
+ * Each action may be executed by clicking the icon or image symbolizing them.
120
+ * By default, a `Zoom To` action styled with a magnifying glass icon is included.
121
+ * When this icon is clicked, the view zooms in four LODs and centers on the selected feature.
122
+ *
123
+ * This default action can be removed by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#includeDefaultActions) to `false`, or by setting the
124
+ * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
125
+ * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
126
+ *
127
+ * @internal
128
+ * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
129
+ * @example
130
+ * ```js
131
+ * // Defines an action button to zoom out from the selected feature
132
+ * const zoomOutAction = new ActionButton({
133
+ * title: "Zoom out",
134
+ * // The ID by which to reference the action in the event handler
135
+ * id: "zoom-out",
136
+ * // Sets the icon used to style the action button
137
+ * icon: "magnifying-glass-minus"
138
+ * });
139
+ * // Adds the custom action to the popup.
140
+ * featuresModel.actions.push(zoomOutAction);
141
+ * ```
142
+ */
143
+ get actions(): Collection<PopupAction>;
144
+ set actions(value: ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>);
145
+ /**
146
+ * Indicates if the features component is open and is not [waiting for results](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#waitingForResult).
147
+ *
148
+ * @internal
149
+ * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#waitingForResult)
150
+ * @see [open](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#open)
151
+ */
152
+ get active(): boolean;
153
+ /**
154
+ * The highlighted feature on the map that is either hovered over or in focus within the feature menu.
155
+ *
156
+ * @internal
157
+ */
158
+ accessor activeFeature: Graphic | null | undefined;
159
+ /**
160
+ * Indicates if aggregated feature browsing is active in a
161
+ * [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/). This value becomes
162
+ * `true` when the user enables feature browsing with the "Browse features" cluster
163
+ * [action button](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/).
164
+ * the "Browse features" action. This should only be set programmatically when the
165
+ * [selectedFeature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeature) is
166
+ * an [aggregate graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) and represents a cluster.
167
+ *
168
+ * @default false
169
+ * @internal
170
+ */
171
+ accessor aggregatedFeaturesEnabled: boolean;
172
+ /**
173
+ * A collection of [actions](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/).
174
+ *
175
+ * @internal
176
+ */
177
+ get allActions(): Collection<PopupAction>;
178
+ /**
179
+ * The information to display. When this property is set, this content may
180
+ * only be static and cannot use fields to set content templates. To set a template
181
+ * for the content based on field or attribute names, see
182
+ * [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content).
183
+ *
184
+ * @internal
185
+ * @see [Sample - Popup Docking](https://developers.arcgis.com/javascript/latest/sample-code/popup-docking-position/)
186
+ * @example
187
+ * ```js
188
+ * // This sets generic instructions in the popup that will always be displayed
189
+ * // unless it is overridden by a PopupTemplate.
190
+ * features.content = "Click a feature on the map to view its attributes";
191
+ * ```
192
+ */
193
+ accessor content: string | HTMLElement | null | undefined;
194
+ /**
195
+ * A read-only property that specifies a [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of action [buttons](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) and/or [toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/).
196
+ * By default, there is a "Zoom to" action that allows users to zoom to the selected feature.
197
+ *
198
+ * > [!WARNING]
199
+ * >
200
+ * > In order to disable any default actions, it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#includeDefaultActions) to `false`.
201
+ *
202
+ * @internal
203
+ */
204
+ get defaultActions(): Collection<PopupAction>;
205
+ /**
206
+ * Enables automatic creation of a popup template for layers that have popups enabled but no
207
+ * popupTemplate defined. Automatic popup templates are supported for layers that
208
+ * support the `createPopupTemplate` method. (Supported for
209
+ * [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/),
210
+ * [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/),
211
+ * [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
212
+ * [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
213
+ * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
214
+ * [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)),
215
+ * [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/),
216
+ * [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/),
217
+ * [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/),
218
+ * [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/),
219
+ * [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/),
220
+ * [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
221
+ * [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/),
222
+ * [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/),
223
+ * [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/),
224
+ * [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/),
225
+ * [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and
226
+ * [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/)).
227
+ *
228
+ * @default false
229
+ * @internal
230
+ */
231
+ accessor defaultPopupTemplateEnabled: boolean;
232
+ /**
233
+ * The heading currently displayed for the selected feature item.
234
+ *
235
+ * This value resolves to the selected feature item's heading when available,
236
+ * otherwise it falls back to [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#heading).
237
+ *
238
+ * @internal
239
+ * @see [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#heading)
240
+ * @see [selectedFeatureItem](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeatureItem)
241
+ */
242
+ get effectiveHeading(): string | null | undefined;
243
+ /**
244
+ * The number of selected [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features) available.
245
+ *
246
+ * @default 0
247
+ * @internal
248
+ */
249
+ get featureCount(): number;
250
+ /**
251
+ * Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that can be used when querying and displaying content.
252
+ *
253
+ * @internal
254
+ */
255
+ get featureItemAbilities(): FeatureAbilities | null | undefined;
256
+ set featureItemAbilities(value: FeatureAbilitiesProperties | null | undefined);
257
+ /**
258
+ * An array of [FeatureContent](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/) items.
259
+ *
260
+ * @internal
261
+ */
262
+ get featureItems(): FeatureContent[];
263
+ /**
264
+ * The current page number in the feature browsing menu. If the feature menu is not open, this value is `null`.
265
+ * This value is dependent on the [featuresPerPage](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#featuresPerPage).
266
+ *
267
+ * @internal
268
+ */
269
+ accessor featurePage: number | null | undefined;
270
+ /**
271
+ * An array of features. Each graphic in this array must
272
+ * have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) set. They may share the same
273
+ * [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) or have unique
274
+ * [PopupTemplates](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) depending on their attributes.
275
+ * The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#content) and [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#heading) properties
276
+ * are set based on the `content` and `title` properties of each graphic's respective
277
+ * [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
278
+ *
279
+ * When more than one graphic exists in this array, the current content is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeature).
280
+ *
281
+ * @internal
282
+ * @example
283
+ * ```js
284
+ * // When setting the features property, the graphics pushed to this property
285
+ * // must have a PopupTemplate set.
286
+ * let g1 = new Graphic();
287
+ * g1.popupTemplate = new PopupTemplate({
288
+ * title: "Results title",
289
+ * content: "Results: {ATTRIBUTE_NAME}"
290
+ * });
291
+ * // Create an array of graphics and set this to the features property. The content and heading of
292
+ * // will be set depending on the PopupTemplate of the graphics.
293
+ * // Each graphic may share the same PopupTemplate or have a unique PopupTemplate.
294
+ * let graphics = [g1, g2, g3, g4, g5];
295
+ * featuresItem.features = graphics;
296
+ * ```
297
+ */
298
+ accessor features: Graphic[];
299
+ /**
300
+ * The number of features to fetch at one time.
301
+ *
302
+ * @default 20
303
+ * @internal
304
+ */
305
+ accessor featuresPerPage: number;
306
+ /**
307
+ * The heading. This can be set to any string value no
308
+ * matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeature)
309
+ * has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), then the title set in the
310
+ * corresponding template is used here.
311
+ *
312
+ * @internal
313
+ * @example
314
+ * ```js
315
+ * // This heading will display in the popup unless a selected feature's
316
+ * // PopupTemplate overrides it.
317
+ * featureComponent.heading = "Population by zip codes in Southern California";
318
+ * ```
319
+ */
320
+ accessor heading: string | null | undefined;
321
+ /**
322
+ * Highlight the selected feature using one of the [HighlightOptions](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/) defined in the view's
323
+ * [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection.
324
+ *
325
+ * @default true
326
+ * @internal
327
+ */
328
+ accessor highlightEnabled: boolean;
329
+ /**
330
+ * Indicates whether or not to include [defaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#defaultActions).
331
+ *
332
+ * > [!WARNING]
333
+ * >
334
+ * > In order to disable any [default actions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#defaultActions), it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#includeDefaultActions) to `false`.
335
+ *
336
+ * @default true
337
+ * @internal
338
+ * @example
339
+ * // Removes the default actions
340
+ * featureComponent.includeDefaultActions = false;
341
+ */
342
+ accessor includeDefaultActions: boolean;
343
+ /**
344
+ * Indicates whether to initially display a list of features, or the content for one feature.
345
+ *
346
+ * @default "feature"
347
+ * @internal
348
+ */
349
+ accessor initialDisplayMode: InitialDisplayOptions;
350
+ /**
351
+ * Geometry used to show the location of the feature. This is automatically set when selecting a feature. If displaying content not related
352
+ * to features in the map, such as the results from a task, then you must set this
353
+ * property before setting [open](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#open) to `true`.
354
+ *
355
+ * @internal
356
+ * @see [Get started with popups](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/)
357
+ * @example
358
+ * // Sets the location to the center of the view
359
+ * featuresItem.location = view.center;
360
+ * featuresItem.open = true;
361
+ * @example
362
+ * // Display the featuresItem when and where the user clicks the view.
363
+ * reactiveUtils.on(()=>view, "click", ({ mapPoint })=>{
364
+ * featuresItem.location = mapPoint;
365
+ * featuresItem.open = true;
366
+ * });
367
+ */
368
+ get location(): Point | null | undefined;
369
+ set location(value: PointProperties | null | undefined);
370
+ /**
371
+ * A map is required when the input [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features) have a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use the `$map` profile variable to access data from layers within a map. Without a map, expressions that use `$map` will throw an error.
372
+ *
373
+ * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#view) property can be used to provide the map instance for this property.
374
+ *
375
+ * @internal
376
+ * @since 4.30
377
+ * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
378
+ * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
379
+ * @example
380
+ * // The building footprints represent the buildings that intersect a clicked parcel
381
+ * let buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints"));
382
+ */
383
+ accessor map: EsriMap | null | undefined;
384
+ /**
385
+ * Indicates whether the component is open. This property is `true` when querying for results, even if it is not open.
386
+ * Use the [active](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#active) property to check if the component is open and is not [waiting for results](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#waitingForResult).
387
+ *
388
+ * @default false
389
+ * @internal
390
+ * @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#active)
391
+ * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#waitingForResult)
392
+ */
393
+ accessor open: boolean;
394
+ /**
395
+ * The number of [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises) remaining to be resolved.
396
+ *
397
+ * @default 0
398
+ * @internal
399
+ * @see [promises property](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises)
400
+ */
401
+ get pendingPromisesCount(): number;
402
+ /**
403
+ * The number of selected [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises) available.
404
+ *
405
+ * @default 0
406
+ * @internal
407
+ */
408
+ get promiseCount(): number;
409
+ /**
410
+ * An array of pending Promises that have not yet been fulfilled. If there are
411
+ * no pending Promises, the value is `null`. When the pending Promises are
412
+ * resolved they are removed from this array and the features they return
413
+ * are pushed into the [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features) array.
414
+ *
415
+ * @internal
416
+ */
417
+ accessor promises: Promise<Graphic[]>[];
418
+ /**
419
+ * The selected feature accessed. The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#content) is
420
+ * determined based on the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) assigned to
421
+ * this feature.
422
+ *
423
+ * @internal
424
+ */
425
+ get selectedFeature(): Graphic | null;
426
+ /**
427
+ * Index of the feature that is [selected](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeature). When [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features) are set,
428
+ * the first index is automatically selected.
429
+ *
430
+ * @internal
431
+ */
432
+ accessor selectedFeatureIndex: number;
433
+ /**
434
+ * The selected [FeatureContent](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/) item.
435
+ *
436
+ * @internal
437
+ */
438
+ get selectedFeatureItem(): FeatureContent;
439
+ /**
440
+ * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
441
+ * This property should be set if Arcade expressions are executed that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
442
+ *
443
+ * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#view) property can be used to provide the spatial reference instance for this property.
444
+ *
445
+ * @internal
446
+ * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
447
+ * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
448
+ */
449
+ get spatialReference(): SpatialReference | null | undefined;
450
+ set spatialReference(value: SpatialReferenceProperties | null | undefined);
451
+ /**
452
+ * The state.
453
+ *
454
+ * @default "disabled"
455
+ * @internal
456
+ */
457
+ get state(): State;
458
+ /**
459
+ * Dates and times will be displayed in this time zone. By default this time zone is
460
+ * inherited from [MapView.timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#view) property is set. When a MapView is not associated, then the property will fallback to the `system` time zone.
461
+ *
462
+ * **Possible Values**
463
+ *
464
+ * Value | Description |
465
+ * ----- | ----------- |
466
+ * system | Dates and times will be displayed in the timezone of the device or browser.
467
+ * unknown | Dates and time are not adjusted for any timezone.
468
+ * Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
469
+ *
470
+ * @internal
471
+ */
472
+ get timeZone(): TimeZone;
473
+ set timeZone(value: TimeZone | null | undefined);
474
+ /**
475
+ * Indicates whether to update the [location](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#location) when the [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeatureIndex) changes.
476
+ *
477
+ * @default false
478
+ * @internal
479
+ */
480
+ accessor updateLocationEnabled: boolean;
481
+ /**
482
+ * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
483
+ *
484
+ * > [!WARNING]
485
+ * >
486
+ * > A view is required if the user expects it to display content in any of the following situations:
487
+ * > - The [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features) have a popupTemplate containing Arcade expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/) or reference the `$map` profile variable (i.e. access data from layers within a map).
488
+ * > - Content is displayed from the popup template of an [aggregate feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) (i.e. a [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) or [bin](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/)).
489
+ * > - Values from `date` and `timestamp-offset` [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) should respect the view's [time zone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone).
490
+ * > - When using the [fetchFeatures()](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#fetchFeatures) method.
491
+ *
492
+ * @internal
493
+ */
494
+ accessor view: MapViewOrSceneView | null | undefined;
495
+ /**
496
+ * Indicates whether the component is waiting for content to be resolved.
497
+ *
498
+ * @internal
499
+ */
500
+ get waitingForContents(): boolean;
501
+ /**
502
+ * Indicates whether a feature was found while resolving [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises).
503
+ *
504
+ * @default false
505
+ * @internal
506
+ * @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#active)
507
+ */
508
+ get waitingForResult(): boolean;
509
+ /**
510
+ * Number of levels of detail (LOD) to zoom in on the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeature).
511
+ *
512
+ * @default 4
513
+ * @internal
514
+ * @example
515
+ * // Restricts the zooming to two LODS when the zoom in action is clicked.
516
+ * featureComponent.zoomFactor = 2;
517
+ */
518
+ accessor zoomFactor: number;
519
+ /**
520
+ * Removes all [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises), [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features), [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#content), and
521
+ * [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#heading).
522
+ *
523
+ * @internal
524
+ */
525
+ clear(): void;
526
+ /**
527
+ * Use this method to return feature(s) at a given screen location.
528
+ * These features are fetched from all of the
529
+ * [LayerViews](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) in the
530
+ * [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). In order to use this, a layer must already have an
531
+ * associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) and have its
532
+ * [FeatureLayer.popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#popupEnabled).
533
+ *
534
+ * @param screenPoint - An object representing a point on the screen.
535
+ * @param options - The [options](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#FetchFeaturesOptions)
536
+ * to pass into the `fetchFeatures` method.
537
+ * @returns Resolves with the selected `hitTest` location. In addition, it also returns an array of [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) if the `hitTest` is
538
+ * performed directly on the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/), a single Promise containing an array of all resulting
539
+ * [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/), or an array of objects containing this array of resulting [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in addition to its associated
540
+ * [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/).
541
+ * @internal
542
+ */
543
+ fetchFeatures(screenPoint: ScreenPoint | null | undefined, options?: FetchFeaturesOptions): Promise<FetchPopupFeaturesResult>;
544
+ /**
545
+ * Selects the feature at the next index in relation to the selected feature.
546
+ *
547
+ * @internal
548
+ * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeatureIndex)
549
+ */
550
+ next(): void;
551
+ /**
552
+ * Selects the feature at the previous index in relation to the selected feature.
553
+ *
554
+ * @internal
555
+ * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeatureIndex)
556
+ */
557
+ previous(): void;
558
+ /**
559
+ * Sets the view to a given target. If [goToOverride](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#goToOverride) is set, `goToOverride()` will be called with the current view and specified `params`.
560
+ * Otherwise, the view will be set using the provided `params`.
561
+ *
562
+ * @param params - The parameters to pass to the `zoomTo()` method.
563
+ * @returns A promise that resolves when the view's extent updates to the value defined in `params.target`.
564
+ * @internal
565
+ * @see [MapView.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#goTo) or [SceneView.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#goTo)
566
+ */
567
+ zoomTo(params: GoToParameters): Promise<void>;
568
+ }
569
+ declare const FeatureContentCollectionSuperclass: typeof EventedAccessor & typeof GoTo
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import i from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import s from"../core/Logger.js";import{abortMaybe as n}from"../core/maybe.js";import{debounce as o,isAbortError as a,logOnError as l}from"../core/promiseUtils.js";import h from"../core/ReactiveSet.js";import{watch as u,when as c,sync as p}from"../core/reactiveUtils.js";import{addMany as d}from"../core/SetUtils.js";import{property as g,subclass as m}from"../core/accessorSupport/decorators.js";import f from"../geometry/Point.js";import{initializeProjection as y,project as _}from"../geometry/projectionUtils.js";import F from"../geometry/SpatialReference.js";import{geographicToWebMercator as v}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as w}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as C}from"../layers/LayerConstants.js";import{ActionsCollection as b,zoomToAggregatedFeatures as I,browseAggregatedFeatures as P,zoomToFeature as A}from"./actions.js";import{getSelectedTarget as L}from"./actionUtils.js";import j from"./FeatureContent.js";import x from"./support/FeatureAbilities.js";import{getDisplayedSymbol as E}from"../symbols/support/symbolUtils.js";import{system as R}from"../time/constants.js";import{highlightsSupported as O}from"../views/support/layerViewUtils.js";import{GoTo as U}from"../widgets/support/GoTo.js";const S="location-scale-handle",T=()=>[A.clone()],H=()=>[I.clone(),P.clone()];let M=null;function D(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let V=class extends(U(r)){constructor(e){super(e),this._pendingPromises=new h,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new x,this.actions=new b,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=o(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([u(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),u(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),u(()=>this.location,e=>this._locationChange(e)),u(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),u(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),u(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),u(()=>this.featureItems,()=>this._featureItemsChange()),u(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),c(()=>!this.waitingForResult,()=>this._waitingForResultChange(),p),c(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._pendingPromises.clear(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new b;e.removeAll();const{actions:i,defaultActions:r,defaultPopupTemplateEnabled:s,includeDefaultActions:n,selectedFeature:o}=this,a=n?r.concat(i):i,l=o&&("function"==typeof o.getEffectivePopupTemplate&&o.getEffectivePopupTemplate(s)||o.popupTemplate),h=l?.actions,u=l?.overwriteActions?h:h?.concat(a)??a;return u?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new b;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?H():T()),e}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get initialDisplayMode(){return this._get("initialDisplayMode")||"feature"}set initialDisplayMode(e){this._set("initialDisplayMode",e),this._syncSelectedFeatureIndex(this.features)}set location(e){const t=e?.spatialReference?.isWGS84&&this.spatialReference?.isWebMercator?v(e):e;this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),d(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){return-1===this.selectedFeatureIndex?null:this.features[this.selectedFeatureIndex]??null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.view?this.view.ready?"ready":"disabled":this.map?"ready":"disabled"}get timeZone(){return this.view?.timeZone??R}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:r}=this;if(!r||!e)throw new i("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:r});return r.fetchPopupFeaturesLegacy(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount)}previous(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount)}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_syncSelectedFeatureIndex(e){const{pendingPromisesCount:t,promiseCount:i,selectedFeatureIndex:r}=this,s=i&&e.length;"list"!==this.initialDisplayMode?s&&t&&-1===r?this.selectedFeatureIndex=0:s&&-1!==r||(this.selectedFeatureIndex=e.length?0:-1):(!s||s&&t===i)&&(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=L(this);this._cancelCenterAtLocation();const r=new AbortController,{signal:n}=r;return this._centerAtLocationController=r,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:n}}).catch(e=>{a(e)||s.getLogger(this).error(e)}):Promise.reject(new i("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:r}=this;r&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){"list"!==this.initialDisplayMode&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:r,featureItems:s}=this;if(null==i)return;const n=((i-1)*r+t)%t,o=Math.min(n+r,s.length);for(let a=n;a<o;a++){const t=s[a];t&&(t.graphic??=e[a])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;const s=w(e)?.type;if("map-image"!==s&&"imagery"!==s&&"imagery-tile"!==s||(e.symbol=await E(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,r=this.view,s=this.spatialReference,n=this.map,o=this.timeZone,a=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const h=[],u=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,h[p]=d,void c.add(d);const g=u.get(t);if(g&&!c.has(g))return g.abilities=l,h[p]=g,void c.add(g);const m=new j({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:s,graphic:t===e?t:null,location:a,map:n,view:r,timeZone:o});h[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:r}=this;if(!r)return null;await r.when();const s=e?.spatialReference;return s&&i?(await y(s,i,null,t),r.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=n(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=n(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:r}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:r}),{signal:r,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const r=new AbortController,{signal:s}=r;this._fetchFeaturesController=r;const n=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:s,event:i});return n.catch(()=>{}).finally(()=>{this._fetchFeaturesController===r&&(this._fetchFeaturesController=null)}),n}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(S),this.addHandles([u(()=>this.view?.scale,()=>l(this._debouncedLocationUpdate(t),s.getLogger(this))),c(()=>!this.open,()=>{this.removeHandles(S)},{once:!0})],S);const{pendingFeatures:r}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:r}}async _locationUpdate(e,t){const{spatialReference:i}=this,r=this.selectedFeature?.geometry?.type,n=this.location??e;if(r&&"mesh"!==r&&i&&n&&this.selectedFeature){if("point"===r){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let r=e.geometry;const s=this._getHighlightLayer(e),o=e.getObjectId();if(!s||!this.view)return;if(o){const e=this.view?.allLayerViews.find(e=>e.layer.uid===s.uid);if(!e||!("queryFeatures"in e))return;const n=e.createQuery();n.outSpatialReference=i,n.objectIds=[o],n.returnGeometry=!0;const{features:a}=await e.queryFeatures(n,t);r=a[0]?.geometry}if(!r||"mesh"===r.type)return;r=_(r,i),M??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[a,l]=M;if(!a.execute(r,n)){const t=l.getNearestCoordinate(r,n).coordinate??n;this.selectedFeature===e&&(this.location=t)}}catch(o){a(o)||s.getLogger(this).error(o)}}}_cancelLocationUpdate(){this._locationUpdateController=n(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=w(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(D(t.type,i))return e;const r=e.getObjectId();if(null!=r)return r;const s="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||C:null,n=e.attributes;return n&&s&&n[s]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:r,view:s,open:n}=this;if(!s||!r||!n)return;const o=this._getHighlightLayer(i);if(!o)return;const a=this._getHighlightLayerView(s,o);if(!a)return;this._highlightPromises[e]=a;const l=await a;if(!(l&&O(l)&&this._highlightPromises[e]===a&&this[t]&&this.highlightEnabled))return;const h=l.highlight(this._getHighlightTarget(i,o,s.type));this.addHandles(h,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=new Set(t),r=e.filter(e=>!i.has(e));r?.length&&(this.features=t.concat(r))}};e([g()],V.prototype,"_fetchFeaturesController",void 0),e([g({type:b})],V.prototype,"actions",void 0),e([g({readOnly:!0})],V.prototype,"active",null),e([g()],V.prototype,"activeFeature",void 0),e([g({readOnly:!0})],V.prototype,"allActions",null),e([g()],V.prototype,"aggregatedFeaturesEnabled",void 0),e([g({value:null})],V.prototype,"content",null),e([g({type:b,readOnly:!0})],V.prototype,"defaultActions",null),e([g({type:Boolean})],V.prototype,"defaultPopupTemplateEnabled",void 0),e([g({readOnly:!0})],V.prototype,"effectiveHeading",null),e([g({readOnly:!0})],V.prototype,"featureCount",null),e([g()],V.prototype,"featurePage",void 0),e([g({value:[]})],V.prototype,"features",null),e([g()],V.prototype,"featuresPerPage",void 0),e([g()],V.prototype,"featureMenuOpen",void 0),e([g({type:x})],V.prototype,"featureItemAbilities",void 0),e([g({readOnly:!0})],V.prototype,"featureItems",void 0),e([g()],V.prototype,"heading",void 0),e([g()],V.prototype,"highlightEnabled",void 0),e([g()],V.prototype,"includeDefaultActions",void 0),e([g({value:"feature"})],V.prototype,"initialDisplayMode",null),e([g({type:f})],V.prototype,"location",null),e([g()],V.prototype,"map",null),e([g()],V.prototype,"open",void 0),e([g({readOnly:!0})],V.prototype,"pendingPromisesCount",null),e([g({readOnly:!0})],V.prototype,"promiseCount",null),e([g()],V.prototype,"promises",null),e([g({value:null,readOnly:!0})],V.prototype,"selectedFeature",null),e([g({value:-1})],V.prototype,"selectedFeatureIndex",null),e([g({readOnly:!0})],V.prototype,"selectedFeatureItem",null),e([g({type:F})],V.prototype,"spatialReference",null),e([g({readOnly:!0})],V.prototype,"state",null),e([g()],V.prototype,"timeZone",null),e([g()],V.prototype,"updateLocationEnabled",void 0),e([g()],V.prototype,"view",void 0),e([g({readOnly:!0})],V.prototype,"waitingForContents",null),e([g({readOnly:!0})],V.prototype,"waitingForResult",null),e([g()],V.prototype,"zoomFactor",void 0),V=e([m("esri.popup.FeatureContentCollection")],V);const Z=V;export{Z as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e="20260726",a="880de31da74ebc9bfb1f929172a92f6d4c9e6a53";export{e as buildDate,a as commitHash};
2
+ const e="20260728",d="4b44fe2decd2d62c4f526e0bf99a7133de541f32";export{e as buildDate,d as commitHash};