import type SelectionManager from "../../views/SelectionManager.js"; import type SelectionOperation from "../../views/selection/SelectionOperation.js"; import type Widget from "../Widget.js"; import type VisibleElements from "./SelectionToolbar/VisibleElements.js"; import type { SelectableViewUnion, SelectionOperationType, SelectionSource } from "../../views/selection/types.js"; import type { WidgetProperties } from "../Widget.js"; import type { SelectionToolConfig, SelectionToolOptions, SelectionToolbarState } from "./SelectionToolbar/types.js"; import type { VisibleElementsProperties } from "./SelectionToolbar/VisibleElements.js"; /** * Properties for customizing the SelectionToolbar widget. * * @internal */ export interface SelectionToolbarProperties extends WidgetProperties, Partial> { /** * The SelectionToolbar widget's default label. * * @internal * @since 4.11 */ label?: string | null; /** * The visible elements that are displayed within the widget. * This property provides the ability to turn individual elements of the widget's display on/off. * * @internal */ visibleElements?: VisibleElementsProperties; } /** * A toolbar widget for performing selection operations on a view. * * @internal */ export default class SelectionToolbar extends Widget { /** @internal */ constructor(properties?: SelectionToolbarProperties, parentNode?: string | Element); /** * Reference to the active operation. * * @internal */ get activeOperation(): SelectionOperation | null | undefined; /** * An array of operation type names that determines what operation types appear in the associated dropdown component. * * @internal */ accessor availableOperationTypes: SelectionOperationType[]; /** * Determines if the selection tool should automatically reactivate a new selection operation * after the completion of an active selection operation, using options from the previous operation. * This only applies if the previous selection operation was completed, and not cancelled. * * @internal */ accessor continuousSelectionEnabled: boolean; /** * Default configuration for the lasso tool. * * @internal */ accessor defaultLassoToolOptions: SelectionToolOptions; /** * The type of operation used by default by new selection operations. * * @internal */ accessor defaultOperationType: SelectionOperationType; /** * Default configuration for the point tool. * * @internal */ accessor defaultPointToolOptions: SelectionToolOptions; /** * Default configuration for the polygon tool. * * @internal */ accessor defaultPolygonToolOptions: SelectionToolOptions; /** * Default configuration for the rectangle tool. * * @internal */ accessor defaultRectangleToolOptions: SelectionToolOptions; /** * Disables the widget UI. Setting this property to true while an * operation is active does not cancel the operation. * * @default false * @internal */ accessor disabled: boolean; /** * Reference to the selection manager being used, if any. * * @internal */ get effectiveSelectionManager(): SelectionManager | null | undefined; /** * Reference to validated sources. Includes associated layer views if `layerViewPreferenceEnabled` is true. * * @internal */ get effectiveSources(): SelectionSource[]; /** * Indicates whether the selection toolbar will ignore layer visibility when determining selection results. * Non-visible layers and layer views are typically excluded from selection results. * * @internal */ accessor ignoreLayerVisibility: boolean; /** * The SelectionToolbar widget's default label. * * @internal * @since 4.11 */ get label(): string; set label(value: string | null | undefined); /** * An array of [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/), containing selection candidates. * * @internal */ accessor layers: SelectionSource[] | null | undefined; /** * Indicates if selection operations should prefer layer view queries for determining * selection results. When this is false, the selection operation will query layer targets * directly. * * @internal */ accessor layerViewPreferenceEnabled: boolean; /** * Controls the orientation of the rendered * calcite action group. * * @default "horizontal" * @internal */ accessor layout: "horizontal" | "vertical"; /** * Determines if new selection results should be persisted by * the associated SelectionManager. * * @internal */ accessor persistSelection: boolean; /** * Determines if selected features should be returned with fields * necessary for displaying feature titles as defined by the WebMap. * * @internal */ accessor returnFeatureTitleFields: boolean; /** * Determines if selected features should be returned with geometries. * Set this value to false to improve selection response time. * * @internal */ accessor returnGeometry: boolean; /** * Reference to a unique selection manager to use instead of the view's default selection manager. * * @internal */ accessor selectionManager: SelectionManager | null | undefined; /** * Determines if the tool should actively determine the potential selection while * the associated draw tool is active, or only a single time when drawing is complete. * * @internal */ accessor selectOnComplete: boolean; /** * An array of layer or layer views that selection is derived from. * * @internal */ accessor sources: SelectionSource[] | null | undefined; /** * State of the toolbar widget. * * @internal */ get state(): SelectionToolbarState; /** * An array of configurations for custom selection tools to display in the widget UI. * * @internal */ accessor toolConfigs: SelectionToolConfig[]; /** * The view from which the widget will operate. * * @internal */ accessor view: SelectableViewUnion | null | undefined; /** * The visible elements that are displayed within the widget. * This property provides the ability to turn individual elements of the widget's display on/off. * * @internal */ get visibleElements(): VisibleElements; set visibleElements(value: VisibleElementsProperties); /** @internal */ get visibleToolCount(): number; }