UNPKG

@arcgis/map-components

Version:
185 lines (183 loc) • 8.88 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; import { default as Feature } from '@arcgis/core/widgets/Feature.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useFeatureWidget: (component: LitElement & Pick<Feature, "icon" | "label" | "viewModel" | "map" | "spatialReference" | "timeZone" | "headingLevel" | "graphic" | "defaultPopupTemplateEnabled" | "location"> & { state?: unknown; viewModel?: __esri.FeatureViewModel | 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>; }) => Feature; /** * The Feature component displays a graphic according to its [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This component is useful in instances where you want to display information about a feature but without the use of a [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-feature/) */ export declare class ArcgisFeature extends LitElement { /** * 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-feature/#destroy) method when you are done to * prevent memory leaks. * * @default false */ autoDestroyDisabled: boolean; /** * Enables automatic creation of a popup template for layers that have popups enabled but no * popupTemplate defined. * * @default false */ defaultPopupTemplateEnabled: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * * @default null */ graphic: nullish | __esri.Graphic; /** * Indicates the heading level to use for the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#title) of the feature widget. * * @default 2 */ headingLevel: number; /** * Indicates whether to hide all [AttachmentsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html). * * @default false */ hideContentAttachments: boolean | undefined; /** * Indicates whether to hide all [ExpressionContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ExpressionContent.html). * * @default false */ hideContentExpression: boolean | undefined; /** * Indicates whether to hide all [FieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html). * * @default false */ hideContentFields: boolean | undefined; /** * Indicates whether to hide all [MediaContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html). * * @default false */ hideContentMedia: boolean | undefined; /** * Indicates whether to hide all [TextContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html). * * @default false */ hideContentText: boolean | undefined; /** * @deprecated since 4.33, use [hideLastEditedInfo](#hideLastEditedInfo) instead. * @default false */ hideLastEditInfo: boolean | undefined; /** * Indicates whether to hide the [lastEditInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo). * * @default false */ hideLastEditedInfo: boolean | undefined; /** * Indicates whether to hide the title associated with the feature. * * @default false */ hideTitle: boolean | undefined; /** * 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 "polygon" */ icon: string; /** * The widget's default label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#label) */ label: string; /** * The location of the graphic to be displayed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#location) * * @default null */ location: nullish | __esri.Point; /** * A map is required when the input [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#graphic) has 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; /** * 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 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" | "loading" | "disabled" | "error"; /** * 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-Feature.html#timeZone) */ timeZone: string; /** Permanently destroy the component. */ destroy(): Promise<void>; /** Paginates to the next [media info](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos). */ nextMedia(contentElementIndex: number): Promise<void>; /** Paginates to the previous [media info](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos). */ previousMedia(contentElementIndex: number): Promise<void>; /** * Paginates to a specified [media info](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos) object. * For example, you may have [media content](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos) which contains multiple mediaInfos. * This method allows you to specify the index of the mediaInfos you wish to display. */ setActiveMedia(contentElementIndex: number, mediaInfoIndex: 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"; }>; /** Emitted when the component associated with a map or scene view is is ready to be interacted with. */ readonly arcgisReady: TargetedEvent<this, void>; } export {};