UNPKG

@arcgis/map-components

Version:
229 lines (227 loc) • 10.4 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; import { default as BasemapLayerList } from '@arcgis/core/widgets/BasemapLayerList.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useBasemapLayerListWidget: (component: LitElement & Pick<BasemapLayerList, "icon" | "label" | "viewModel" | "headingLevel" | "collapsed" | "dragEnabled" | "filterPlaceholder" | "minFilterItems" | "selectedItems" | "selectionMode" | "catalogOptions" | "visibilityAppearance" | "baseFilterPredicate" | "baseFilterText" | "baseListItemCreatedFunction" | "basemapTitle" | "editingTitle" | "referenceFilterPredicate" | "referenceFilterText" | "referenceListItemCreatedFunction"> & { state?: unknown; viewModel?: __esri.BasemapLayerListViewModel | 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>; }) => BasemapLayerList; /** * The Basemap Layer List component provides a way to display a list of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) layers and switch on/off their visibility. [Base layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) and [reference layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#referenceLayers) are divided into separate sections. When editing is enabled, layers can be reordered by dragging and dropping between the lists and the title can be edited. * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-basemap-layer-list/) */ export declare class ArcgisBasemapLayerList extends LitElement { /** * Emitted when the component's close button is clicked. * * @since 4.33 */ readonly arcgisClose: TargetedEvent<this>; /** * 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-basemap-layer-list/#destroy) method when you are done to * prevent memory leaks. * * @default false */ autoDestroyDisabled: boolean; /** * Specifies a function to handle filtering base layer [list items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). * * @default null */ baseFilterPredicate: nullish | __esri.BaseFilterPredicate; /** * The value of the filter input text string if [visibleElements.filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#visibleElements) is true. * * @default "" */ baseFilterText: string; /** A collection of ListItems representing the baseLayers. */ get baseItems(): __esri.Collection<__esri.ListItem>; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) representing a base layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#baseListItemCreatedFunction) */ baseListItemCreatedFunction: nullish | __esri.ListItemCreatedHandler; /** * The current basemap's title. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#basemapTitle) */ basemapTitle: string | nullish; /** The CatalogLayerList that displays a catalog layer's dynamic group layer. */ get catalogLayerList(): __esri.CatalogLayerList | nullish; /** * [CatalogLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CatalogLayer.html) specific properties. * * @default null */ catalogOptions: nullish | __esri.BasemapLayerListCatalogOptions; /** * Indicates whether a component is closed. When `true`, the component will be hidden. * * @since 4.33 * @default false */ closed: boolean; /** * Indicates whether the widget is collapsed. * * @default false */ collapsed: boolean; /** * Indicates whether [list items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) may be reordered within the list by dragging and dropping. * * @default false */ dragEnabled: boolean; /** * Indicates whether the form to edit the basemap's title is currently visible. * * @default false */ editingTitle: boolean; /** * Placeholder text used in the filter input if [visibleElements.filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#visibleElements) is true. * * @default "" */ filterPlaceholder: string; /** * Indicates the heading level to use for the widget title (i.e. * * @default 2 */ headingLevel: number; /** @default false */ hideBaseLayers: boolean; /** @default false */ hideFlow: boolean; /** @default false */ hideHeading: boolean; /** @default false */ hideReferenceLayers: boolean; /** @default false */ hideStatusIndicators: 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 "layers" */ icon: string; /** * The widget's default label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#label) */ label: string; /** * The minimum number of list items required to display the visibleElements.filter input box. * * @default 10 */ minFilterItems: number; /** @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; /** * Specifies a function to handle filtering reference layer [list items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). * * @default null */ referenceFilterPredicate: nullish | __esri.ReferenceFilterPredicate; /** * The value of the filter input text string if [visibleElements.filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#visibleElements) is true. * * @default "" */ referenceFilterText: string; /** A collection of ListItems representing the referenceLayers. */ get referenceItems(): __esri.Collection<__esri.ListItem>; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) representing a reference layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#referenceListItemCreatedFunction) */ referenceListItemCreatedFunction: nullish | __esri.ListItemCreatedHandler; /** * A collection of selected [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html)s representing basemap layers * selected by the user. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#selectedItems) */ selectedItems: __esri.Collection<__esri.ListItem>; /** * Specifies the selection mode. * * @default "none" */ selectionMode: "single" | "multiple" | "none" | "single-persist"; /** @default false */ showCloseButton: boolean; /** @default false */ showCollapseButton: boolean; /** @default false */ showEditTitleButton: boolean; /** @default false */ showErrors: boolean; /** @default false */ showFilter: boolean; /** @default false */ showTemporaryLayerIndicators: boolean; /** * The current state of the component. * * @default "disabled" */ readonly state: "ready" | "loading" | "disabled"; /** * Determines the icons used to indicate visibility. * * @default "default" */ visibilityAppearance: "default" | "checkbox"; /** Permanently destroy the component. */ destroy(): 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>; /** Emitted when an action is triggered on the component. */ readonly arcgisTriggerAction: TargetedEvent<this, __esri.BasemapLayerListTriggerActionEvent>; } export {};