import type Graphic from "../Graphic.js"; import type EsriMap from "../Map.js"; import type Collection from "../core/Collection.js"; import type Point from "../geometry/Point.js"; import type SpatialReference from "../geometry/SpatialReference.js"; import type FeatureModel from "./FeatureModel.js"; import type FeatureAbilities from "./support/FeatureAbilities.js"; import type { EventedAccessor } from "../core/Evented.js"; import type { ScreenPoint, ScreenRect } from "../core/types.js"; import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js"; import type { FetchFeaturesOptions, InitialDisplayOptions, PopupAction, State } from "./types.js"; import type { TimeZone } from "../time/types.js"; import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js"; import type { FetchPopupFeaturesDiagnostics } from "../views/PopupView.js"; import type { GoTo, GoToProperties } from "../widgets/support/GoTo.js"; import type { GoToParameters } from "../widgets/support/types.js"; import type { ActionToggleProperties } from "../support/actions/ActionToggle.js"; import type { ActionButtonProperties } from "../support/actions/ActionButton.js"; import type { ReadonlyArrayOrCollection } from "../core/Collection.js"; import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js"; import type { PointProperties } from "../geometry/Point.js"; export interface FeaturesModelProperties extends GoToProperties, Partial> { /** * [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. * Each action may be executed by clicking the icon or image symbolizing them. * By default, a `Zoom To` action styled with a magnifying glass icon is included. * When this icon is clicked, the view zooms in four LODs and centers on the selected feature. * * This default action can be removed by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#includeDefaultActions) to `false`, or by setting the * [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/). * 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/). * * @internal * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/) * @example * ```js * // Defines an action button to zoom out from the selected feature * const zoomOutAction = new ActionButton({ * title: "Zoom out", * // The ID by which to reference the action in the event handler * id: "zoom-out", * // Sets the icon used to style the action button * icon: "magnifying-glass-minus" * }); * // Adds the custom action to the popup. * featuresContentCollection.actions.push(zoomOutAction); * ``` */ actions?: ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>; /** Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that can be used when querying and displaying content. */ featureItemAbilities?: FeatureAbilitiesProperties | null; /** * Geometry used to show the location of the feature. This is automatically set when selecting a feature. If displaying content not related to features in the map, such as the results from a task, then you must set this property before setting [open](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#open) to `true`. * * @see [Intro to popup component](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/) * @example * // Sets the location to the center of the view * featuresModel.location = viewElement.center; * featuresModel.open = true; * @example * // Display the featuresModel when and where the user clicks the view. * reactiveUtils.on(()=>viewElement, "arcgisViewClick", ({ details: { mapPoint } })=>{ * featuresModel.location = mapPoint; * featuresModel.open = true; * }); */ location?: PointProperties | null; /** * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. * This property should be set if Arcade expressions are executed that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/). * * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#view) property can be used to provide the spatial reference instance for this property. * * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/) */ spatialReference?: SpatialReferenceProperties | null; /** * Dates and times will be displayed in this time zone. By default this time zone is * inherited from the associated [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#view) property is set. When a view is not associated, then the property will fallback to the `system` time zone. * * **Possible Values** * * Value | Description | * ----- | ----------- | * system | Dates and times will be displayed in the timezone of the device or browser. * unknown | Dates and time are not adjusted for any timezone. * 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). */ timeZone?: TimeZone | null; } /** * Provides reactive state and behavior for the [Features (Next)](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) and [Popup](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) components, including fetching and paging popup features, tracking selection, and coordinating highlighting and actions. * * @since 5.2 * @see [Features (Next) component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) * @see [Popup component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) */ export default class FeaturesModel extends FeaturesModelSuperclass { constructor(properties?: FeaturesModelProperties); /** * [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. * Each action may be executed by clicking the icon or image symbolizing them. * By default, a `Zoom To` action styled with a magnifying glass icon is included. * When this icon is clicked, the view zooms in four LODs and centers on the selected feature. * * This default action can be removed by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#includeDefaultActions) to `false`, or by setting the * [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/). * 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/). * * @internal * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/) * @example * ```js * // Defines an action button to zoom out from the selected feature * const zoomOutAction = new ActionButton({ * title: "Zoom out", * // The ID by which to reference the action in the event handler * id: "zoom-out", * // Sets the icon used to style the action button * icon: "magnifying-glass-minus" * }); * // Adds the custom action to the popup. * featuresContentCollection.actions.push(zoomOutAction); * ``` */ get actions(): Collection; set actions(value: ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>); /** * Indicates if the features component is open and is not [waiting for results](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#waitingForResult). * * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#waitingForResult) * @see [open](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#open) */ get active(): boolean; /** The highlighted feature on the map that is either hovered over or in focus within the feature menu. */ accessor activeFeature: Graphic | null | undefined; /** * Indicates if aggregated feature browsing is active in 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/). This value becomes `true` when the user enables feature browsing with the "Browse features" [action button](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) in the aggregate popup template. This should only be set programmatically when the [selectedFeature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeature) is an [aggregate graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate). * * @default false */ accessor aggregatedFeaturesEnabled: boolean; /** * The information to display. When this property is set, this content may * only be static and cannot use fields to set content templates. To set a template * for the content based on field or attribute names, see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content). * * @see [Sample - Intro to popup component](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/) * @example * ```js * // This sets generic instructions in the popup that will always be displayed * // unless it is overridden by a PopupTemplate. * features.content = "This is the content for the selected feature. It can be set to any string or HTML element."; * ``` */ accessor content: string | HTMLElement | null | undefined; /** The default actions for the selected feature, or the default zoom action when no feature is selected. */ get defaultActions(): Collection; /** * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. Supported for [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/), [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)), [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/), [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/), [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/), [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/), [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/), [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/), [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/). * * @default false */ accessor defaultPopupTemplateEnabled: boolean; /** * Diagnostics collected while fetching features from a view. * * @since 5.2 */ get diagnostics(): FetchPopupFeaturesDiagnostics | null | undefined; /** * The heading currently displayed for the selected feature item. * * This value resolves to the [selected feature item's heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeatureItem) when available, otherwise it falls back to [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#heading). * * @see [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#heading) * @see [selectedFeatureItem](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeatureItem) */ get effectiveHeading(): string | null | undefined; /** * The number of selected [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#features) available. * * @default 0 */ get featureCount(): number; /** Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that can be used when querying and displaying content. */ get featureItemAbilities(): FeatureAbilities | null | undefined; set featureItemAbilities(value: FeatureAbilitiesProperties | null | undefined); /** * This property enables showing the list of features. * Setting this to `true` allows the user to scroll through the list of features. * This value will only be honored if [initialDisplayMode](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#initialDisplayMode) is set to `feature`. * * @default false * @internal */ accessor featureMenuOpen: boolean; /** * Lazily created models indexed by their position in features. * * @internal */ get featureModels(): FeatureModel[]; /** * The number of feature batches prepared for browsing. Each batch contains up to [featuresPerPage](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#featuresPerPage) features. This value is `null` when there are no features. * * Set this value to `1` to reset browsing, or increment it by one to prepare the next batch. Other assignments are ignored. Selecting a feature does not change this value; use [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeatureIndex) to select any feature independently of browsing. * * @default null */ accessor featurePage: number | null | undefined; /** * An array of features. Each [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) depending on their attributes. * The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#content) and [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#heading) properties are set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/). * * 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/FeaturesModel/#selectedFeature). * * @example * ```js * // When setting the features property, the graphics pushed to this property * // must have a PopupTemplate set. * let g1 = new Graphic(); * g1.popupTemplate = new PopupTemplate({ * title: "Results title", * content: "Results: {ATTRIBUTE_NAME}" * }); * let g2 = new Graphic(); * g2.popupTemplate = new PopupTemplate({ * title: "Results title", * content: "Results: {ATTRIBUTE_NAME}" * }); * let g3 = new Graphic(); * g3.popupTemplate = new PopupTemplate({ * title: "Results title", * content: "Results: {ATTRIBUTE_NAME}" * }); * let g4 = new Graphic(); * g4.popupTemplate = new PopupTemplate({ * title: "Results title", * content: "Results: {ATTRIBUTE_NAME}" * }); * let g5 = new Graphic(); * g5.popupTemplate = new PopupTemplate({ * title: "Results title", * content: "Results: {ATTRIBUTE_NAME}" * }); * // Create an array of graphics and set this to the features property. The content and heading ofvwill be set depending on the PopupTemplate of the graphics. * // Each graphic may share the same PopupTemplate or have a unique PopupTemplate. * let graphics = [g1, g2, g3, g4, g5]; * featuresModel.features = graphics; * ``` */ accessor features: Graphic[]; /** * The number of features to fetch at one time. * * @default 20 */ accessor featuresPerPage: number; /** * Streams features into the component as they become available. * * The first feature is published immediately. Subsequent features are published in short batches, with remaining results published when the stream completes or fails. Clearing or replacing the stream discards its unpublished results. * * @internal */ accessor featureStream: AsyncGenerator | null | undefined; /** * The heading. This can be set to any string value no matter the features that are selected. If the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeature) has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), then the title set in the corresponding template is used here. * * @example * ```js * // This heading will display in the popup unless a selected feature's * // PopupTemplate overrides it. * featureComponent.heading = "Population by zip codes in Southern California"; * ``` */ accessor heading: string | null | undefined; /** * Indicates whether to 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 [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection. * * @default true */ accessor highlightEnabled: boolean; /** * Indicates whether or not to include [defaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#defaultActions). * * > [!WARNING] * > * > In order to disable any [default actions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#defaultActions), it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#includeDefaultActions) to `false`. * * @default true * @example * // Removes the default actions * featuresModel.includeDefaultActions = false; */ accessor includeDefaultActions: boolean; /** * Indicates whether to initially display a list of features, or the content for one feature. * By default, a list is displayed when the associated view has `focusRegionVisible` enabled; otherwise, the content for one feature is displayed. */ accessor initialDisplayMode: InitialDisplayOptions; /** * Geometry used to show the location of the feature. This is automatically set when selecting a feature. If displaying content not related to features in the map, such as the results from a task, then you must set this property before setting [open](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#open) to `true`. * * @see [Intro to popup component](https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/) * @example * // Sets the location to the center of the view * featuresModel.location = viewElement.center; * featuresModel.open = true; * @example * // Display the featuresModel when and where the user clicks the view. * reactiveUtils.on(()=>viewElement, "arcgisViewClick", ({ details: { mapPoint } })=>{ * featuresModel.location = mapPoint; * featuresModel.open = true; * }); */ get location(): Point | null | undefined; set location(value: PointProperties | null | undefined); /** * A map is required when the input [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#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. * * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#view) property can be used to provide the map instance for this property. * * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/) */ accessor map: EsriMap | null | undefined; /** * Indicates whether the component is open. This property is `true` when querying for results, even if it is not open. Use the [active](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#active) property to check if the component is open and is not [waiting for results](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#waitingForResult). * * @default false * @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#active) * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#waitingForResult) */ accessor open: boolean; /** The location supplied when opening a feature stream while waiting for the first feature. This is `null` after the first feature arrives or the stream ends. Unlike [location](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#location), it does not change the popup location while waiting. */ get pendingLocation(): Point | null | undefined; /** * The selected feature accessed. The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#content) is * determined based on the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) assigned to * this feature. */ get selectedFeature(): Graphic | null; /** Index of the feature that is [selected](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeature). When the [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#features) property is set, the first index (`0`) is automatically selected. */ accessor selectedFeatureIndex: number; /** The selected [FeatureModel](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureModel/) item. */ get selectedFeatureItem(): FeatureModel; /** * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. * This property should be set if Arcade expressions are executed that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/). * * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#view) property can be used to provide the spatial reference instance for this property. * * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/) */ get spatialReference(): SpatialReference | null | undefined; set spatialReference(value: SpatialReferenceProperties | null | undefined); /** * The state. * * @default "disabled" */ get state(): State; /** * Indicates whether features are being streamed into the collection. * * @since 5.2 */ get streamingFeatures(): boolean; /** * Dates and times will be displayed in this time zone. By default this time zone is * inherited from the associated [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#view) property is set. When a view is not associated, then the property will fallback to the `system` time zone. * * **Possible Values** * * Value | Description | * ----- | ----------- | * system | Dates and times will be displayed in the timezone of the device or browser. * unknown | Dates and time are not adjusted for any timezone. * 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). */ get timeZone(): TimeZone; set timeZone(value: TimeZone | null | undefined); /** * Indicates whether to update the [location](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#location) when the [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeatureIndex) changes. * * @default false */ accessor updateLocationEnabled: boolean; /** * 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/). * * > [!WARNING] * > * > A view is required if the user expects it to display content in any of the following situations: * > - The [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#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). * > - 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/)). * > - Values from `date` and `timestamp-offset` [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) should respect the associated [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#timeZone). */ accessor view: MapViewOrSceneView | null | undefined; /** Indicates whether content is being generated for any currently loaded feature models. */ get waitingForContents(): boolean; /** * Indicates whether the current feature stream is waiting to yield its first feature. Previously displayed features remain available while this property is `true`. It becomes `false` when the current stream yields a feature or completes. * * @see [active](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#active) */ get waitingForResult(): boolean; /** * Number of levels of detail (LOD) to zoom in on the [selected feature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeature). * * @default 4 * @example * // Restricts the zooming to two LODS when the zoom in action is clicked. * featuresModel.zoomFactor = 2; */ accessor zoomFactor: number; /** Removes the [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#features), [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#content), [heading](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#heading), [location](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#location), and [activeFeature](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#activeFeature). */ clear(): void; /** * Fetches feature(s) at a given screen location and updates the component's featureStream * * @param screenPointOrArea - An object representing a point or area on the screen. * @param options - The [options](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#FetchFeaturesOptions) * to pass into the `fetchFeatures` method. * @returns A promise that resolves when feature fetching has been initiated and * [featureStream](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#featureStream) has been updated. * @internal */ fetchFeatures(screenPointOrArea: ScreenPoint | ScreenRect | null | undefined, options?: FetchFeaturesOptions): Promise; /** * Selects the feature at the next index in relation to the selected feature. * * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeatureIndex) */ next(): void; /** * Opens the collection with a location and a feature stream. While waiting, the collection remains at its current location and becomes active when the first feature is available. * If the location is `null` or `undefined`, the first feature's geometry determines the location. If no features become available, the collection closes without changing its location. * * @param options - The feature source and location used to open the collection. * @internal */ openFeatureStream(options: { featureStream: AsyncGenerator; diagnostics?: FetchPopupFeaturesDiagnostics; location: Point | null | undefined; }): void; /** * Selects the feature at the previous index in relation to the selected feature. * * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#selectedFeatureIndex) */ previous(): void; /** * Sets the view to a given target. If [goToOverride](https://developers.arcgis.com/javascript/latest/references/core/popup/FeaturesModel/#goToOverride) is set, `goToOverride()` will be called with the current view and specified `params`. * Otherwise, the view will be set using the provided `params`. * * @param params - The parameters to pass to the `zoomTo()` method. * @returns A promise that resolves when the view's extent updates to the value defined in the [GoToParameters.target](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/types/#GoToParameters). * @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) */ zoomTo(params: GoToParameters): Promise; } declare const FeaturesModelSuperclass: typeof EventedAccessor & typeof GoTo