UNPKG

@vertigis/viewer-spec

Version:

VertiGIS Viewer Specification

74 lines (73 loc) 2.44 kB
import type { FeatureSource } from "@vertigis/arcgis-extensions/data/FeatureSource.js"; import type { Command } from "../Command.js"; import { CommandRegistry } from "../CommandRegistry.js"; import type { Operation } from "../Operation.js"; import { OperationRegistry } from "../OperationRegistry.js"; import type { LayersLike, ModelRef } from "../common.js"; /** * A filter that can be displayed in the filter builder. */ export interface Filter { /** * The feature source to filter. One of `source` or `layers` is required. */ source?: FeatureSource; /** * Alias of `source`, to facilitate command chaining. If multiple layers are * present, only the first will be used as the source. One of `source` or * `layers` is required. */ layers?: LayersLike; /** * The where clause to filter by. */ where?: string; } /** * Base arguments for commands/operations that target filter builder components. */ export interface FilterBuilderArgsBase { /** * The filter builder component that will be targeted. If not specified, all * active filter builder components in the layout will be targeted. */ filterBuilder?: ModelRef; } /** * Arguments for the "filter-builder.set-filter" command. */ export interface SetFilterArgs extends FilterBuilderArgsBase, Filter { } export declare class FilterBuilderCommands extends CommandRegistry { protected readonly _prefix = "filter-builder"; /** * Sets the current filter criteria in the filter builder and also activates * the component. Web only. * * @webOnly */ get displayFilter(): Command<SetFilterArgs>; /** * Sets the current filter criteria in the filter builder. Web only. * * @webOnly */ get setFilter(): Command<SetFilterArgs>; } /** * Arguments for the "filter-builder.get-filter" operation. */ export interface GetFilterArgs extends Required<FilterBuilderArgsBase> { } export declare class FilterBuilderOperations extends OperationRegistry { protected readonly _prefix = "filter-builder"; /** * Gets the currently visible filter from the specified filter builder * component. Note that this filter may not have yet been applied to the * layer, so it might differ from the layer's definition expression. Web * only. * * @webOnly */ get getFilter(): Operation<GetFilterArgs, Filter | undefined>; }