/// import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js"; import type MapView from "@arcgis/core/views/MapView.js"; import type { IBasemapConfig, IMapInfo, ISearchConfiguration, VisibilityIconType } from "../../utils/interfaces.js"; import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { UIPosition } from "@arcgis/core/views/ui/types.js"; import type { T9nMeta } from "@arcgis/lumina/controllers"; export abstract class MapTools extends LitElement { /** * Contains the translations for this component. * All UI strings should be defined here. * * @internal */ protected _translations: { legend: string; search: string; expand: string; basemap: string; layers: string; collapse: string; enterFullscreen: string; exitFullscreen: string; floorFilter: string; selectionTools: string; selectByRectangle: string; selectByLasso: string; clearSelection: string; defaultMapView: string; } & T9nMeta<{ legend: string; search: string; expand: string; basemap: string; layers: string; collapse: string; enterFullscreen: string; exitFullscreen: string; floorFilter: string; selectionTools: string; selectByRectangle: string; selectByLasso: string; clearSelection: string; defaultMapView: string; }>; /** IBasemapConfig: List of any basemaps to filter out from the basemap widget */ accessor basemapConfig: IBasemapConfig | undefined; /** * 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 basemap widget will be available * * @default false */ accessor enableBasemap: boolean; /** * string[]: Optional list of enabled layer ids * If empty all layers will be available */ accessor enabledLayerIds: string[]; /** * boolean: when true the floor filter widget will be available * * @default false */ accessor enableFloorFilter: boolean; /** * boolean: when true the fullscreen widget will be available * * @default false */ accessor enableFullscreen: boolean; /** * boolean: when true the home widget will be available * * @default false */ accessor enableHome: boolean; /** * boolean: when true the layer list widget will be available * * @default false */ accessor enableLayerList: boolean; /** * boolean: when true the legend widget will be available * * @default false */ accessor enableLegend: boolean; /** * boolean: when true the map layer picker will be available * * @default false */ accessor enableMapLayerPicker: boolean; /** * boolean: when true the map picker will be available * * @default false */ accessor enableMapPicker: boolean; /** * boolean: when true the search widget will be available * * @default false */ accessor enableSearch: boolean; /** * boolean: when true the selection tools will be available * * @default false */ accessor enableSelectionTool: boolean; /** * boolean: when true map tools will be displayed within a single expand/collapse widget * when false widgets will be loaded individually into expand widgets * * @default false */ accessor enableSingleExpand: boolean; /** * When true the component will render an optimized view for mobile devices * * @default false */ accessor isMobile: boolean; /** * 'horizontal' | 'vertical': used to control the orientation of the tools * * @default 'vertical' */ accessor layout: "horizontal" | "vertical"; /** IMapInfo: key configuration details about the current map */ accessor mapInfo: IMapInfo | undefined; /** IMapInfo[]: array of map infos (name and id) */ accessor mapInfos: IMapInfo[]; /** esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */ accessor mapView: MapView | undefined; /** * 's' | 'm' | 'l': Used for optional map tool widget * * @default 'm' */ accessor mapWidgetsSize: "l" | "m" | "s"; /** Parent component height */ accessor parentComponentHeight: number | undefined; /** Parent component width */ accessor parentComponentWidth: number | undefined; /** * UIPosition: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#UIPosition * The position details for the tools * * @default 'top-leading' */ accessor position: UIPosition; /** ISearchConfiguration: Configuration details for the Search widget */ accessor searchConfiguration: ISearchConfiguration | undefined; /** number[]: A list of ids that are currently selected */ accessor selectedFeaturesIds: (number | string)[]; /** FeatureLayer: Selected feature layer */ accessor selectedLayer: FeatureLayer | undefined; /** * string: selected web map * * @default '' */ accessor selectedWebMapId: string; /** string[]: Selection tools to show */ accessor selectionTools: string[]; /** * boolean: When true only editable layers that support the update capability will be available * * @default false */ accessor showOnlyUpdatableLayers: boolean; /** * boolean: When true the map widget tools will have no margin between them. * When false the map widget tools will have a margin between them. * * @default true */ accessor stackTools: boolean; /** * Tools to show and its order * Valid tools: 'home', 'legend', 'search', 'fullscreen', 'basemap', 'floorfilter', 'selectiontool', 'layers-list', 'map-picker', 'map-layer-picker' */ accessor toolOrder: string[]; /** * VisibilityIconType: visibility icon for the layer list widget * * @default 'eyeball' */ accessor visibilityIcon: VisibilityIconType; /** * 's' | 'm' | 'l': Used for Zoom tools * * @default 'm' */ accessor zoomToolsSize: "l" | "m" | "s"; /** Emitted on demand when clear selection button is clicked */ readonly clearSelection: import("@arcgis/lumina").TargetedEvent; readonly "@eventTypes": { clearSelection: MapTools["clearSelection"]["detail"]; }; }