UNPKG

@arcgis/map-components

Version:
112 lines (110 loc) 5.22 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/components-controllers'; import { Nil } from '@arcgis/components-utils'; import { default as Search } from '@arcgis/core/widgets/Search.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useSearchWidget: (component: import('@arcgis/components-controllers').StencilLifecycles & { manager: import('@arcgis/components-controllers').ControllerManager; el: HTMLElement; autoDestroyDisabled?: boolean; destroy?: () => Promise<void>; } & Pick<Search, never> & { reactiveUtils?: typeof __esri.reactiveUtils; state?: unknown; viewModel?: __esri.SearchViewModel | undefined; icon: Nil | string; label: Nil | string; referenceElement: ArcgisReferenceElement | Nil | string; position: __esri.UIPosition; arcgisReady: import('@arcgis/components-controllers').EventEmitter; arcgisPropertyChange: import('@arcgis/components-controllers').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.MapView | __esri.SceneView | Nil; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }, options?: { editConstructorProperties(props: __esri.widgetsSearchProperties | undefined): __esri.widgetsSearchProperties | Promise<__esri.widgetsSearchProperties | undefined> | undefined; } | undefined) => Search; /** Search component provides a way to perform search operations */ export declare class ArcgisSearch extends LitElement { activeMenu: "none" | "source" | "warning" | "suggestion"; readonly activeSource: nullish | __esri.LayerSearchSource | __esri.LocatorSearchSource; activeSourceIndex: number; allPlaceholder: string | nullish; readonly allSources: __esri.Collection<__esri.LayerSearchSource | __esri.LocatorSearchSource>; /** * 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\` method when you are done to prevent * memory leaks. */ autoDestroyDisabled: boolean; /** @default false */ autoSelectDisabled: boolean; readonly defaultSources: __esri.Collection<__esri.LayerSearchSource | __esri.LocatorSearchSource>; disabled: boolean; /** * Icon which represents the component. * Typically used when the component is controlled by another component (e.g. by the Expand component). * Search [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/) for possible values. */ icon: string; /** @default false */ includeDefaultSourcesDisabled: boolean | Function; /** The component's default label. */ label: string; /** @default false */ locationDisabled: boolean; maxResults: number; maxSuggestions: number; minSuggestCharacters: number; /** @default false */ popupDisabled: boolean; popupTemplate: nullish | __esri.PopupTemplate; portal: nullish | __esri.Portal; position: __esri.UIPosition; referenceElement: ArcgisReferenceElement | Nil | string; readonly resultGraphic: nullish | __esri.Graphic; /** @default false */ resultGraphicDisabled: boolean; readonly results: any[] | nullish; /** @default false */ searchAllDisabled: boolean; searchTerm: string; readonly selectedResult: nullish | __esri.SearchResult; sources: __esri.Collection<__esri.SearchSource>; readonly state: "ready" | "loading" | "disabled" | "searching"; readonly suggestions: nullish | __esri.SearchResultsSuggestions[]; /** @default false */ suggestionsDisabled: boolean; blurSearch(): Promise<void>; clearSearch(): Promise<void>; /** Permanently destroy the component */ destroy(): Promise<void>; focusSearch(): Promise<void>; search(term: __esri.Point | __esri.SuggestResult | nullish | number[] | string): Promise<__esri.SearchResponse | nullish>; suggest(term: string): Promise<__esri.SuggestResponse | nullish>; readonly arcgisBlur: TargetedEvent<this, __esri.SearchSearchBlurEvent>; readonly arcgisClear: TargetedEvent<this, __esri.SearchSearchClearEvent>; readonly arcgisComplete: TargetedEvent<this, __esri.SearchSearchCompleteEvent>; readonly arcgisFocus: TargetedEvent<this, __esri.SearchSearchFocusEvent>; readonly arcgisPropertyChange: TargetedEvent<this, { name: "state"; }>; readonly arcgisReady: TargetedEvent<this, undefined>; readonly arcgisSelectResult: TargetedEvent<this, __esri.SearchSelectResultEvent>; readonly arcgisStart: TargetedEvent<this, __esri.SearchSearchStartEvent>; readonly arcgisSuggestComplete: TargetedEvent<this, __esri.SearchSuggestCompleteEvent>; readonly arcgisSuggestStart: TargetedEvent<this, __esri.SearchSuggestStartEvent>; } export {};