/// import type MapView from "@arcgis/core/views/MapView.js"; import type { IBeforeLayerSelectionChange } from "../../utils/interfaces.js"; import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon"; import type { T9nMeta } from "@arcgis/lumina/controllers"; export abstract class MapLayerPicker extends LitElement { /** * T9nStrings: Strings for the UI * * @internal */ protected _translations: { noLayersFound: string; enableEditUpdate: string; switchLayer: string; } & T9nMeta<{ noLayersFound: string; enableEditUpdate: string; switchLayer: string; }>; /** * 'transparent' | 'solid': controls the button appearance when using the 'dropdown' type * * @default 'transparent' */ accessor appearance: "solid" | "transparent"; /** * boolean: when true the layer order should be defined in the enabledLayerIds, when false we will use the older logic of layers first then tables * * @default false */ accessor configLayerOrderDefined: boolean; /** * string: when provided this layer ID will be used when the app loads * * @default '' */ accessor defaultLayerId: string; /** * boolean: When true the layer picker should be disabled * * @default false */ accessor disabled: boolean | undefined; /** * 'inline-flex' | 'inline-block': controls the display style of the dropdown * * @default 'inline-block' */ accessor display: "inline-block" | "inline-flex"; /** * string[]: Optional list of enabled layer ids * If empty all layers will be available */ accessor enabledLayerIds: string[]; /** * number: optional fixed height value for the control. * Specified as pixel height. */ accessor height: number | undefined; /** * When true the component will render an optimized view for mobile devices * * @default false */ accessor isMobile: boolean; /** esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */ accessor mapView: MapView | undefined; /** string: optional placeholder icon used with 'combobox' type */ accessor placeholderIcon: Icon["icon"] | undefined; /** * string: Refrence element for the calcite popover to show the layer list * * @default '' */ accessor referenceElement: string; /** * 's' | 'm' | 'l': scale to render the component * * @default 'm' */ accessor scale: "l" | "m" | "s"; /** string[]: list of layer ids that have been selected by the end user */ accessor selectedIds: string[]; /** * boolean: When true all layers list should shown in a popover (reference element prop required) * In this case the selected layer will not shown as label * * @default false */ accessor showLayersListInPopover: boolean; /** * boolean: When true only editable layers that support the update capability will be available * * @default false */ accessor showOnlyUpdatableLayers: boolean; /** * boolean: when true a map with a single layer will show a label rather than a dropdown * Used in conjunction with _hasMultipleLayers * * @default false */ accessor showSingleLayerAsLabel: boolean; /** * boolean: when true standalone tables will also be available * * @default false */ accessor showTables: boolean; /** * boolean: when true table will shown as disabled * * @default false */ accessor showTablesDisabled: boolean; /** * 'select' | 'combobox' | 'dropdown': type of component to leverage * * @default 'select' */ accessor type: "combobox" | "dropdown" | "select"; /** * Set the layer by id * * @param id * @param skipEditCheck */ setLayerById(id: string, skipEditCheck?: boolean): Promise; /** * Set the layers by ids * * @param ids * @param skipEditCheck */ setLayerByIds(ids: string[], skipEditCheck?: boolean): Promise; /** updates the layers */ updateLayer(): Promise; /** Emitted before a new map is loaded */ readonly beforeLayerSelectionChange: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when valid layers/tables are found */ readonly idsFound: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when a layer is selected */ readonly layerSelectionChange: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when no valid layers are found */ readonly noLayersFound: import("@arcgis/lumina").TargetedEvent; readonly "@eventTypes": { beforeLayerSelectionChange: MapLayerPicker["beforeLayerSelectionChange"]["detail"]; idsFound: MapLayerPicker["idsFound"]["detail"]; layerSelectionChange: MapLayerPicker["layerSelectionChange"]["detail"]; noLayersFound: MapLayerPicker["noLayersFound"]["detail"]; }; }