@arcgis/map-components
Version:
ArcGIS Map Components
691 lines (690 loc) • 42.1 kB
TypeScript
/// <reference path="../../index.d.ts" />
import type FeaturesViewModel from "@arcgis/core/widgets/Features/FeaturesViewModel.js";
import type Collection from "@arcgis/core/core/Collection.js";
import type ActionButton from "@arcgis/core/support/actions/ActionButton.js";
import type ActionToggle from "@arcgis/core/support/actions/ActionToggle.js";
import type Graphic from "@arcgis/core/Graphic.js";
import type Widget from "@arcgis/core/widgets/Widget.js";
import type Map from "@arcgis/core/Map.js";
import type SpatialReference from "@arcgis/core/geometry/SpatialReference.js";
import type { ArcgisReferenceElement, IconName, HeadingLevel } from "../types.js";
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { ArcgisFeature } from "../arcgis-feature/customElement.js";
import type { ActionEvent, FetchFeaturesOptions, PopupAction, InitialDisplayOptions, State } from "@arcgis/core/widgets/Popup/types.js";
import type { ScreenPoint } from "@arcgis/core/core/types.js";
import type { T9nMeta } from "@arcgis/lumina/controllers";
import type { Abilities } from "@arcgis/core/widgets/Feature/types.js";
import type { GoToOverride } from "@arcgis/core/widgets/support/types.js";
import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.js";
/**
* The Features component allows users to view a feature's popupTemplate content such as attributes,
* actions, related records, etc., without having to be tied to an [arcgis-map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) or [arcgis-scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/) component.
* This component looks and behaves similarly to the [arcgis-popup](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) component,
* however unlike Popup, the Features component can be placed outside of the map or scene component.
* For example, when features are selected in the [arcgis-map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/),
* the [arcgis-popup](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-popup/) opens within the map whether it is docked
* or anchored to the selected feature.
* With the Features component, the same information that Popup provides is shown in a separate container from the map, such as
* a HTML div within a Calcite Design System
* [Shell Panel](https://developers.arcgis.com/calcite-design-system/components/shell-panel/).
*
* If multiple features are passed into the Features component, the component provides buttons to page though the features and a feature menu that allows the
* list of features to be displayed so the user can choose which feature content to display in the component. The component also respects
* feature reduction PopupTemplates for [binning](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#popupTemplate) and [clustering](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#popupTemplate).
*
* The Features component should be used if needing to use the Popup functionality outside of the map or scene component. To show a single feature's content without
* actions, related records, clustering configuration, etc., then use the [arcgis-feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component.
*
* > [!WARNING]
* > In version 6.0, the implementation of [arcgis-features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/) will be updated under the hood to that of [arcgis-features-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/), and deprecated properties on this component will be removed. We encourage using the [arcgis-features-next](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/) component and providing feedback.
*
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
* @since 4.28
*/
export abstract class ArcgisFeatures extends LitElement {
/**
* A [collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action button](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.
* There is a default `Zoom To` action styled with a magnifying glass icon to zoom in four LODs and center the map on the selected feature. This default action can be removed by setting [includeDefaultActionsDisabled](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#includeDefaultActionsDisabled) to `true`, or by setting the [`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/). The [@arcgisTriggerAction](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#event-arcgisTriggerAction) event fires each time an action is clicked.
*
* @see [@arcgisTriggerAction](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#event-arcgisTriggerAction)
* @see [Popup actions sample](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
*/
accessor actions: Collection<PopupAction>;
/**
* Indicates if the component is active when it is visible and is not [waiting](https://developers.arcgis.com/javascript/latest/references/core/widgets/Features/FeaturesViewModel/#waitingForResult) for results.
*
* @default false
*/
get active(): boolean;
/**
* If true, the component will not be destroyed automatically when it is
* disconnected from the document. This is useful when you want to move the
* component to a different place on the page, or temporarily hide it. If this
* is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#destroy) method when you are done to
* prevent memory leaks.
*
* @default false
*/
accessor autoDestroyDisabled: boolean;
/**
* Disables chart animation within the component.
*
* @default false
* @since 5.0
*/
accessor chartAnimationDisabled: boolean;
/**
* Indicates whether the component displays its content. If `true`, only the header displays.
* This property is only honored if [showCollapseButton](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#showCollapseButton) is `true`.
*
* @default false
*/
accessor collapsed: boolean;
/**
* Controls the direction the content collapses when the collapse button is used.
* When unset, the component chooses a direction based on the [feature navigation placement](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#featureNavigationTop).
*
* @since 5.1
* @see [showCollapseButton](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#showCollapseButton)
* @see [collapsed](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#collapsed)
* @see [featureNavigationTop](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#featureNavigationTop)
*/
accessor collapseDirection: "down" | "up" | undefined;
/**
* The content of the component. When set directly on the component, this content is 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).
*
* @example
* ```js
* // This sets generic instructions in the component that will always be displayed
* // unless it is overridden by a PopupTemplate.
* component.content = "Click a feature on the map to view its attributes";
* ```
*/
accessor content: string | HTMLElement | Widget<any> | null | undefined;
/**
* 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.
*
* **Note:** Starting with version 4.28, `date` fields are formatted using the `short-date-short-time` preset [dateFormat](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FieldInfoFormat/#dateFormat) rather than `long-month-day-year` in default [popup](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) created by setting the `defaultPopupTemplateEnabled` property to `true`.
* For example, previously a date that may have appeared as `"December 30, 1997"` will now appear as `"12/30/1997 6:00 PM"`.
*
* @default false
* @since 4.34
*/
accessor defaultPopupTemplateEnabled: boolean;
/**
* The heading currently displayed for the selected feature. This value resolves to the selected feature's [PopupTemplate title](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#title) when available, otherwise it falls back to the component's [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#heading).
*
* @since 5.1
* @see [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#heading)
* @see [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature)
*/
get effectiveHeading(): string | undefined;
/**
* The number of [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#features) available in the component.
*
* @since 4.34
*/
accessor featureCount: number;
/**
* This property enables multiple features in the component to display in a list rather than displaying the first selected feature. 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/map-components/components/arcgis-features/#initialDisplayMode) is set to "feature".
*
* @default false
* @since 4.34
*/
accessor featureMenuOpen: boolean;
/**
* Sets the title to display on the component while viewing the feature menu.
*
* @since 4.34
*/
accessor featureMenuTitle: string | null | undefined;
/**
* Indicates whether the feature navigation arrows are displayed at the top of the component.
* By default, the navigation arrows are displayed at the bottom of the component.
* This property also controls the collapse button's icon direction when the [collapseDirection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#collapseDirection) property is not set. When `featureNavigationTop` is `true`, the collapse button icon defaults to collapsing "up" and when `false` it defaults to collapsing "down".
*
* @default false
* @since 4.34
* @see [collapseDirection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#collapseDirection)
* @see [showCollapseButton](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#showCollapseButton)
*/
accessor featureNavigationTop: boolean;
/**
* An array of graphics associated with the component. Each 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/map-components/components/arcgis-features/#content) and [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#heading) of the component is 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 of the component is set based on the value of the [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature).
*
* This value is `null` if no features are associated with the component.
*
* @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}"
* });
* // Set the graphics as an array to the popup instance. The content and title of
* // the component will 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];
* component.features = graphics;
* ```
*/
accessor features: Array<Graphic>;
/**
* The number of features to fetch at one time.
*
* @default 20
*/
accessor featuresPerPage: number;
/** Defines the specific [abilities](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/FeatureViewModel/#Abilities) that can be used when querying and displaying content. */
accessor featureViewModelAbilities: Abilities | null | undefined;
/**
* This function provides the ability to override either the [arcgis-map.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) or [arcgis-scene.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#goTo) methods.
*
* @since 4.33
* @example
* ```js
* component.goToOverride = function(view, goToParams) {
* goToParams.options = {
* duration: updatedDuration
* };
* return view.goTo(goToParams.target, goToParams.options);
* };
* ```
*/
accessor goToOverride: GoToOverride | null | undefined;
/** The actions that are displayed in the header of the component. */
accessor headerActions: Collection<ActionButton | ActionToggle>;
/**
* The title of the Features component. This can be set to any string value no
* matter the features that are selected. If the [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature)
* has a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), then the title set in the
* corresponding template is used here.
*
* @see [headingLevel](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#headingLevel)
* @since 4.34
* @example
* ```js
* // This title will display in the component unless a selected feature's
* // PopupTemplate overrides it.
* featuresComponent.title = "Population by zip codes in Southern California";
* ```
*/
accessor heading: string | null | undefined;
/**
* Indicates the heading level to use for the [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#heading) of the component.
* By default, the heading is rendered
* as a level 2 heading (e.g. `<h2>Popup title</h2>`). Depending on the component's placement
* in your app, you may need to adjust this heading for proper semantics. This is
* important for meeting accessibility standards.
*
* @default 2
*/
accessor headingLevel: HeadingLevel;
/**
* Indicates whether to hide the action bar that holds the feature's [actions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#actions).
*
* @default false
*/
accessor hideActionBar: boolean;
/**
* This property provides the ability to hide or show [attachments content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/AttachmentsContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideAttachmentsContent: boolean;
/**
* Indicates whether to hide the close button in the component.
*
* @default false
*/
accessor hideCloseButton: boolean;
/**
* This property provides the ability to hide or show content within the component.
*
* @default false
* @since 5.0
*/
accessor hideContent: boolean;
/**
* This property provides the ability to hide or show [custom content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/CustomContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideCustomContent: boolean;
/**
* This property provides the ability to hide or show [expression content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideExpressionContent: boolean;
/**
* Indicates whether to hide the group heading for a list of multiple features.
*
* @default false
* @since 4.34
*/
accessor hideFeatureListLayerTitle: boolean;
/**
* Indicates whether to hide the feature menu heading and description in the component's feature menu list.
*
* @default false
*/
accessor hideFeatureMenuHeading: boolean;
/**
* Indicates whether to hide the feature navigation in the component. This allows the user to scroll through various [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#features) using pagination arrows.
*
* @default false
*/
accessor hideFeatureNavigation: boolean;
/**
* This property provides the ability to hide or show [fields content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideFieldsContent: boolean;
/**
* Indicates whether to hide the component's [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#heading).
*
* @default false
*/
accessor hideHeading: boolean;
/**
* This property provides the ability to hide or show the last edited info within the component.
*
* @default false
* @since 5.0
*/
accessor hideLastEditedInfo: boolean;
/**
* This property provides the ability to hide or show [media content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideMediaContent: boolean;
/**
* This property provides the ability to hide or show [relationship content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/RelationshipContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideRelationshipContent: boolean;
/**
* Indicates whether to hide the *select feature* action when viewing associated and related features.
*
* @default false
* @since 5.1
*/
accessor hideSelectFeature: boolean;
/**
* Indicates whether to hide the spinner in the component.
*
* @default false
*/
accessor hideSpinner: boolean;
/**
* This property provides the ability to hide or show [text content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/TextContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideTextContent: boolean;
/**
* This property provides the ability to hide or show [utility network content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/UtilityNetworkAssociationsContent/) within the component.
*
* @default false
* @since 5.0
*/
accessor hideUtilityNetworkContent: boolean;
/**
* Indicates whether to highlight the [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature) in the associated
* [arcgis-map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) or [arcgis-scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/) component.
*
* @default false
* @since 4.34
*/
accessor highlightDisabled: boolean;
/**
* Icon which represents the component.
* Typically used when the component is controlled by another component (e.g. by the Expand component).
*
* @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
*/
accessor icon: IconName | undefined;
/**
* Indicates whether to include the default actions in the component.
* In order to disable any default actions, it is necessary to set `includeDefaultActionsDisabled` to `true`.
*
* @default false
* @since 4.34
*/
accessor includeDefaultActionsDisabled: boolean;
/**
* Indicates whether to initially display a list of features, or the content for one feature.
*
* @default "feature"
*/
accessor initialDisplayMode: InitialDisplayOptions;
/** The component's default label. */
accessor label: string | undefined;
/**
* A map is required when the input [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#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/map-components/components/arcgis-features/#view) property can be used to provide the map instance for this property.
*
* @default null
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
* @example
* ```js
* // The building footprints represent the buildings that intersect a clicked parcel
* let buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints"));
* ```
*/
accessor map: Map | null | undefined;
/**
* Replace localized message strings with your own strings.
*
* _**Note**: Individual message keys may change between releases._
*
* @since 4.34
*/
accessor messageOverrides: {
componentLabel?: string | undefined;
zoom?: string | undefined;
browseClusteredFeatures?: string | undefined;
collapse?: string | undefined;
expand?: string | undefined;
featuresList?: string | undefined;
total?: string | undefined;
pageText?: string | undefined;
selectFeature?: string | undefined;
down?: string | undefined;
first?: string | undefined;
last?: string | undefined;
next?: string | undefined;
page?: string | undefined;
previous?: string | undefined;
up?: string | undefined;
untitled?: string | undefined;
loading?: string | undefined;
back?: string | undefined;
errorMessage?: string | undefined;
returnToInitialFeature?: string | undefined;
maxRecordCountHeading?: string | undefined;
maxRecordCountDescriptionWithLayerList?: string | undefined;
maxRecordCountDescriptionMultipleLayers?: string | undefined;
maxRecordCountDescriptionMaxZoomLevel?: string | undefined;
};
/** @internal */
protected messages: Partial<{
componentLabel: string;
zoom: string;
browseClusteredFeatures: string;
collapse: string;
expand: string;
featuresList: string;
total: string;
pageText: string;
selectFeature: string;
down: string;
first: string;
last: string;
next: string;
page: string;
previous: string;
up: string;
untitled: string;
loading: string;
back: string;
errorMessage: string;
returnToInitialFeature: string;
maxRecordCountHeading: string;
maxRecordCountDescriptionWithLayerList: string;
maxRecordCountDescriptionMultipleLayers: string;
maxRecordCountDescriptionMaxZoomLevel: string;
}> & T9nMeta<{
componentLabel: string;
zoom: string;
browseClusteredFeatures: string;
collapse: string;
expand: string;
featuresList: string;
total: string;
pageText: string;
selectFeature: string;
down: string;
first: string;
last: string;
next: string;
page: string;
previous: string;
up: string;
untitled: string;
loading: string;
back: string;
errorMessage: string;
returnToInitialFeature: string;
maxRecordCountHeading: string;
maxRecordCountDescriptionWithLayerList: string;
maxRecordCountDescriptionMultipleLayers: string;
maxRecordCountDescriptionMaxZoomLevel: string;
}>;
/**
* Indicates whether the component is visible. This property is `true` when the component is querying for results, even if it is not open. Use this property to check if the component is visible.
*
* @default false
* @see [active](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#active)
* @see [clear()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#clear)
* @since 5.0
* @example
* ```js
* // Listen for clicks on the view and open the component at the clicked location with custom content.
* viewElement.addEventListener("arcgisViewClick", (event) => {
* const { mapPoint } = event.detail;
* component.location = mapPoint;
* component.heading = "You clicked here";
* component.content = "Latitude: " + mapPoint.latitude.toFixed(3) + ", Longitude: " + mapPoint.longitude.toFixed(3);
* component.open = true;
* });
* ```
*/
accessor open: boolean;
/**
* An array of pending Promises that have not yet been fulfilled. If there are
* no pending promises, the value is `null`. When the pending promises are
* resolved they are removed from this array and the features they return
* are pushed into the [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#features) array.
*
* @deprecated since 5.1.
*/
accessor promises: Array<Promise<Array<Graphic>>>;
/**
* By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
*
* @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)
*/
accessor referenceElement: ArcgisReferenceElement | string | undefined;
/**
* The feature that the component has drilled into.
* This feature is either associated with the selected feature in a [relationship](https://developers.arcgis.com/javascript/latest/references/core/popup/content/RelationshipContent/)
* or [utility network](https://developers.arcgis.com/javascript/latest/references/core/popup/content/UtilityNetworkAssociationsContent/) element.
*
* @since 4.34
*/
get selectedDrillInFeature(): Graphic | undefined;
/**
* The selected feature accessed by the Features component. The content displayed in the component is
* determined based on the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) assigned to this feature.
*/
get selectedFeature(): Graphic | null;
/**
* Returns a reference to the current [arcgis-feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component.
* This is useful if needing to get a reference to the Feature component in order to make any changes to it.
*
* @since 4.34
*/
get selectedFeatureComponent(): ArcgisFeature | undefined;
/**
* Index of the feature that is [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature). When [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#features) are set,
* the first index is automatically selected.
*/
accessor selectedFeatureIndex: number;
/**
* Indicates whether to show the collapse button in the component.
*
* @default false
* @see [collapsed](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#collapsed)
* @see [collapseDirection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#collapseDirection)
*/
accessor showCollapseButton: boolean;
/**
* The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations.
* This property should be set if the Features component executes Arcade expressions that contain [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/).
*
* Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#view) property can be used to provide the spatial reference instance for this property.
*
* @default null
* @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
* @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
*/
accessor spatialReference: SpatialReference | null | undefined;
/**
* The current state of the component.
*
* @default "disabled"
*/
get state(): State;
/**
* Dates and times displayed in the component will be displayed in this time zone. By default this time zone is
* inherited from [arcgis-map.timeZone](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#view) property is set. When a MapView is not associated with the component
* then the property will fallback to the `system` time zone.
*
* **Possible Values**
* - `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).
*
* @since 4.30
*/
accessor timeZone: string;
/**
* Indicates whether to update the component's location when the [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeatureIndex) changes.
*
* @default false
* @since 5.0
*/
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/).
* The Features component requires a `view` to be set if:
* - The [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#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). Alternatively, set the [map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#map) property.
* - 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 should respect the view's [time zone](https://developers.arcgis.com/javascript/latest/references/core/views/View/#timeZone).
* Alternatively, set the [timeZone](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#timeZone) property.
* - Using the `Zoom to` default action. If the `view` is not specified, set the [includeDefaultActionsDisabled](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#includeDefaultActionsDisabled) property to `true` to remove this default action.
*
* @since 4.34
*/
accessor view: MapViewOrSceneView | null | undefined;
/**
* @deprecated since 5.1. Use properties directly on the component instead of accessing them through the `viewModel`. For example, instead of `viewModel.active`, use `active`.
* @since 4.34
*/
accessor viewModel: FeaturesViewModel;
/**
* Removes [promises](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#promises), [features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#features), [content](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#content), and
* [heading](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#heading) from the Features component.
*/
clear(): Promise<void>;
/** A convenience method to close the component. */
close(): Promise<void>;
/** Permanently destroy the component. */
destroy(): Promise<void>;
/**
* Use this method to return feature(s) at a given screen location. These features are fetched from all of the [LayerViews](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) in the [view](https://developers.arcgis.com/javascript/latest/references/core/views/View/). In order to use this, a layer must already have an associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) and have its [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#popupEnabled). This method allows a developer to control how the input location is handled. For example, you may want to fetch features on a `click` event or on a `pointer-move` event. This method automatically sets the location based on the input event's screen coordinates.
*
* @deprecated since 5.1. Use the `fetchPopupFeatures` method on the [Map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#fetchPopupFeatures), [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#fetchPopupFeatures), or [Link Chart](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-link-chart/#fetchPopupFeatures) component to fetch features based on a screen location.
* @param screenPoint
* @param options
* @deprecated
* @see [open](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#open)
*/
fetchFeatures(screenPoint?: ScreenPoint, options?: FetchFeaturesOptions): Promise<void>;
/**
* Selects the feature at the next index in relation to the [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature).
*
* > [!WARNING]
* > The return type of `FeaturesViewModel` on the `next()` method is deprecated. At 6.0, this method will return void. See [arcgis-features-next.next()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#next) for the updated usage.
*
* @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeatureIndex)
*/
next(): Promise<FeaturesViewModel>;
/**
* Selects the feature at the previous index in relation to the [selectedFeature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeature).
*
* > [!WARNING]
* > The return type of `FeaturesViewModel` on the `previous()` method is deprecated. At 6.0, this method will return void. See [arcgis-features-next.previous()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#previous) for the updated usage.
*
* @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#selectedFeatureIndex)
*/
previous(): Promise<FeaturesViewModel>;
/**
* Use this method to give focus to the Component if the component is able to be focused.
*
* @since 4.34
*/
setFocus(): Promise<void>;
/**
* Triggers the [@arcgisTriggerAction](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#event-arcgisTriggerAction) event and executes the specified default action.
*
* @deprecated since 5.1. Trigger actions with manual user interaction within the component.
* @param action
*/
triggerAction(action: ActionButton | ActionToggle): Promise<void>;
/** Emitted when the component's close button is clicked. */
readonly arcgisClose: import("@arcgis/lumina").TargetedEvent<this, void>;
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "active" | "collapsed" | "effectiveHeading" | "featureCount" | "featureMenuOpen" | "features" | "promises" | "selectedDrillInFeature" | "selectedFeature" | "selectedFeatureComponent" | "selectedFeatureIndex" | "state" | "open"; }>;
/** Emitted when the component associated with a map or scene view is ready to be interacted with. */
readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
/**
* Fires after the user clicks on an action in the component.
* This event may be used to define a custom function to execute when particular actions are clicked.
*
* @see [actions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#actions)
* @see [PopupTemplate.actions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#actions)
* @see [open](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/#open)
* @example
* ```js
* // Fires each time an action is clicked
* reactiveUtils.on(()=> component, "arcgisTriggerAction", (event)=>{
* // If the zoom-out action is clicked, execute the following code
* if(event.detail.action.id === "zoom-out"){
* // Zoom out two levels (LODs)
* viewElement.goTo({
* center: viewElement.center,
* zoom: viewElement.zoom - 2
* });
* }
* });
* ```
*/
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, ActionEvent>;
readonly "@eventTypes": {
arcgisClose: ArcgisFeatures["arcgisClose"]["detail"];
arcgisPropertyChange: ArcgisFeatures["arcgisPropertyChange"]["detail"];
arcgisReady: ArcgisFeatures["arcgisReady"]["detail"];
arcgisTriggerAction: ArcgisFeatures["arcgisTriggerAction"]["detail"];
};
}