UNPKG

@arcgis/map-components

Version:
289 lines (287 loc) • 13.8 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; import { default as Features } from '@arcgis/core/widgets/Features.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useFeaturesWidget: (component: LitElement & Pick<Features, "icon" | "label" | "viewModel" | "map" | "spatialReference" | "timeZone" | "content" | "headingLevel" | "goToOverride" | "collapsed" | "featureNavigationTop" | "features" | "headerActions" | "initialDisplayMode" | "promises" | "selectedFeatureIndex"> & { state?: unknown; viewModel?: __esri.FeaturesViewModel | undefined; closed?: boolean; icon: import('@arcgis/components-utils').Nil | string; label: import('@arcgis/components-utils').Nil | string; referenceElement?: ArcgisReferenceElement | string; position: __esri.UIPosition; arcgisReady: import('@arcgis/lumina').EventEmitter; arcgisPropertyChange: import('@arcgis/lumina').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.LinkChartView | __esri.MapView | __esri.SceneView; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }) => Features; /** * 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 the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-features/) */ export declare class ArcgisFeatures extends LitElement { /** * Emitted when the component's close button is clicked. * * @since 4.33 */ readonly arcgisClose: TargetedEvent<this>; /** * [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [action](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or [action toggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html) objects. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#actions) */ actions: __esri.Collection<__esri.ActionButton | __esri.ActionToggle>; /** * Indicates if the widget is active when it is visible and is not [waiting for results](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#waitingForResult). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#active) * * @default false */ readonly 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/arcgis-features/#destroy) method when you are done to * prevent memory leaks. * * @default false */ autoDestroyDisabled: boolean; /** * Indicates whether a component is closed. When `true`, the component will be hidden. * * @since 4.33 * @default false */ closed: boolean; /** * Indicates whether the popup displays its content. * * @default false */ collapsed: boolean; /** * The content of the Features widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#content) */ content: string | __esri.Widget | HTMLElement | nullish; /** * Indicates whether the feature navigation arrows are displayed at the top of the widget. * * @default false */ featureNavigationTop: boolean; /** * Defines the specific [abilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#Abilities) that can be used when querying and displaying content. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#featureViewModelAbilities) */ featureViewModelAbilities: nullish | __esri.Abilities; /** * An array of features associated with the Features widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#features) */ features: __esri.Graphic[]; /** * The number of features to fetch at one time. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#featuresPerPage) * * @default 20 */ featuresPerPage: number; /** * The title of the Features widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#title) */ featuresTitle: string | nullish; /** * This function provides the ability to override either the * [MapView goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) or * [SceneView goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#goTo) methods. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#goToOverride) */ goToOverride: nullish | __esri.GoToOverride; /** * Indicates the heading level to use for the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#title) of the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#headingLevel) */ headingLevel: number; /** * The actions that are displayed in the header of the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#headerActions) */ headerActions: __esri.Collection<__esri.ActionBase>; /** * Indicates whether to hide the action bar that holds the feature's [action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#actions). * * @default false */ hideActionBar: boolean; /** * Indicates whether to hide the close button. * * @default false */ hideCloseButton: boolean; /** * Indicates whether to hide a heading and description on the widget feature menu list. * * @default false */ hideFeatureMenuHeading: boolean; /** * Indicates whether to hide pagination for feature navigation. * This allows the user to scroll through various selected features using pagination arrows. * * @default false */ hideFeatureNavigation: boolean; /** * Determines whether the component should be shown within its built-in [flow component](https://developers.arcgis.com/calcite-design-system/components/flow/) or if the flow component should be excluded. * The component will be displayed within its original flow component if `false`. * The flow component will be omitted if set to `true`. * To place the component into an existing Calcite flow component, set this property to `false`. * * @default false */ hideFlow: boolean; /** * Indicates whether is hide the heading. * * @default false */ hideHeading: boolean; /** * Indicates whether to hide the loading spinner. * * @default false */ hideSpinner: 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/) * @default null */ icon: string | nullish; /** * Indicates whether or not to include [defaultActions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#defaultActions). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#includeDefaultActions) * * @default true */ includeDefaultActions: boolean; /** * Indicates whether to initially display a list of features, or the content for one feature. * * @default "feature" */ initialDisplayMode: "feature" | "list"; /** * The widget's default label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#label) */ label: string; /** * A map is required when the input [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#features) have a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-ExpressionInfo.html) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ExpressionContent.html) that may use the `$map` profile variable to access data from layers within a map. * * @default null */ map: __esri.Map | nullish; /** @default "bottom-left" */ position: __esri.UIPosition; /** * An array of pending Promises that have not yet been fulfilled. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#promises) */ promises: Promise<any>[]; /** * 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) */ referenceElement?: ArcgisReferenceElement | string; /** * The selected feature accessed by the Features widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#selectedFeature) */ readonly selectedFeature: nullish | __esri.Graphic; /** * Index of the feature that is [selected](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#selectedFeature). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#selectedFeatureIndex) */ selectedFeatureIndex: number; /** @default false */ showCollapseButton: boolean; /** * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. * * @default null */ spatialReference: nullish | __esri.SpatialReference; /** * The current state of the component. * * @default "disabled" */ readonly state: "ready" | "disabled"; /** * Dates and times displayed in the widget will be displayed in this time zone. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#timeZone) */ timeZone: string; clear(): Promise<void>; /** Closes 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 [layer views](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html). * In order to use this, a layer must already have an associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). * This method allows a developer to control how the input location is handled. */ fetchFeatures(screenPoint: __esri.FeaturesFetchFeaturesScreenPoint, options?: __esri.FetchFeaturesOptions): Promise<__esri.FetchPopupFeaturesResult>; next(): Promise<__esri.FeaturesViewModel>; /** Opens Features with content defined either explicitly or driven from the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) of input features. */ open(options?: __esri.FeaturesOpenOptions): Promise<void>; previous(): Promise<__esri.FeaturesViewModel>; triggerAction(actionIndex: number): Promise<void>; /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */ readonly arcgisPropertyChange: TargetedEvent<this, { name: "state" | "selectedFeature" | "selectedFeatureIndex"; }>; /** Emitted when the component associated with a map or scene view is is ready to be interacted with. */ readonly arcgisReady: TargetedEvent<this, void>; /** Emitted when an action is triggered on the component. */ readonly arcgisTriggerAction: TargetedEvent<this, __esri.FeaturesTriggerActionEvent>; } export {};