///
import type View from "@arcgis/core/views/View.js";
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { PickListFieldInfo, PickListGroupInfo, PopoverProps } from "../../utils/types.js";
import type { FieldPickListLayer } from "./utils/types.js";
import type { T9nMeta } from "@arcgis/lumina/controllers";
/**
* A component that displays a list of fields for selection, inside a popover (default) or just as a list.
*
* @slot [content-top] - A slot for content on top of the search filter and list, non-scrollable. Valid only if listOnly is not set to true.
* @slot [content-center] - A slot for content below the search filter and above the list items, will scroll with the list.
* @slot [content-bottom] - A slot for content below the list, non-scrollable. Valid only if listOnly is not set to true.
* @slot [content-footer] - A slot for content below the list inside the panel's footer, non-scrollable. Valid only if listOnly is not set to true.
* @slot [no-fields] - A slot for content, e.g. a message, that displays if the list of fields is empty.
* @internal
*/
export abstract class ArcgisFieldPickList extends LitElement {
/** @internal */
protected _messages: {
ok: string;
done: string;
cancel: string;
back: string;
header: string;
headerSelect: string;
filter: string;
info: string;
edit: string;
delete: string;
displayName: string;
type: string;
default: string;
fieldName: string;
sort: string;
selectAll: string;
deselectAll: string;
noMatches: string;
} & T9nMeta<{
ok: string;
done: string;
cancel: string;
back: string;
header: string;
headerSelect: string;
filter: string;
info: string;
edit: string;
delete: string;
displayName: string;
type: string;
default: string;
fieldName: string;
sort: string;
selectAll: string;
deselectAll: string;
noMatches: string;
}>;
/** Custom function to distinguish expressions from fields. */
accessor customExpressionCheck: ((field: PickListFieldInfo) => boolean) | undefined;
/** Header text for group containing expressions, if 'groupFieldsAndExpressions' is set to true. */
accessor expressionsGroupHeading: string | undefined;
/**
* All display fields with name, alias, type, and description, sorted by default order.
* A field with type "none" will always show at the bottom of the list without an info action.
*/
accessor fields: PickListFieldInfo[] | PickListGroupInfo[];
/** Header text for group containing fields, if 'groupFieldsAndExpressions' is set to true. */
accessor fieldsGroupHeading: string | undefined;
/** Filter no results text. If empty string ("") no text will be shown. */
accessor filterNoResultsText: string | undefined;
/** Filter placeholder text. */
accessor filterPlaceholderText: string | undefined;
/**
* @deprecated
* Pass in grouped lists of fields instead.
* If true, fields and expressions are placed in separate groups.
* @default false
*/
accessor groupFieldsAndExpressions: boolean | undefined;
/** Heading text. Valid only if listOnly is not set to true. */
accessor heading: string | undefined;
/**
* If true, hides the cancel button. Valid only if listOnly is not set to true.
*
* @default false
*/
accessor hideCancel: boolean;
/**
* If true, hides the sort menu button.
*
* @default false
*/
accessor hideSort: boolean;
/** Layer instance. */
accessor layer: FieldPickListLayer | undefined;
/**
* If true, renders without a popover.
*
* @default false
*/
accessor listOnly: boolean;
/** @deprecated use view instead */
accessor mapView: View | undefined;
/**
* If true, allows for multiple selection. If false, the
* popover will close once an item has been selected.
*
* @default false
*/
accessor multiple: boolean;
/** Ok button text. Ok button only shows when multiple set to true. Valid only if listOnly is not set to true. */
accessor okBtnText: string | undefined;
/** Convenience prop to specify common popover props, `popoverProps.refElement` is required. Valid only if listOnly is not set to true. */
accessor popoverProps: PopoverProps | undefined;
/** The initially selected fields. Will use selectedFields[0] when multiple is set to false. */
accessor selectedFields: string[];
/**
* @deprecated use hideCancel instead
* @default true
*/
accessor showCancel: boolean;
/**
* If true, displays description. By default only displays field alias.
*
* @default false
*/
accessor showDescription: boolean;
/**
* If true, displays the field info button. Valid only if listOnly is not set to true.
*
* @default false
*/
accessor showFieldInfo: boolean;
/**
* If true, displays field name. By default only displays field alias.
*
* @default false
*/
accessor showFieldName: boolean;
/**
* If true, displays an icon corresponding to the field's type.
*
* @default false
*/
accessor showFieldTypeIcon: boolean;
/**
* If true, displays the filter option based on the number of fields.
*
* @default 10
*/
accessor showFilterLength: number;
/**
* If true, displays a 'Select All' button on top of the list. Valid only if multiple is set to true.
*
* @default false
*/
accessor showSelectionAll: boolean;
/**
* @deprecated use hideSort instead
* @default true
*/
accessor showSort: boolean;
/**
* The initial sort order.
*
* @default "default"
*/
accessor sortBy: LastSortBy;
/** View instance. */
accessor view: View | undefined;
/** Reposition the component. */
reposition(): Promise;
/**
* Control whether the component is disabled.
*
* @param disable
*/
setDisabled(disable: boolean): Promise;
/** Set focus on the component. */
setFocus(): Promise;
/** Emitted when the selected fields have changed. selectedFields contains fields in order of the user's selection. */
readonly arcgisChange: import("@arcgis/lumina").TargetedEvent;
/** Emitted when the pick list has been closed. */
readonly arcgisClose: import("@arcgis/lumina").TargetedEvent;
/** Emitted when the delete icon of a field has been clicked. The field must have PickListFieldInfo.showDeleteAction set to true. */
readonly arcgisDeleteField: import("@arcgis/lumina").TargetedEvent;
/** Emitted when the edit icon of a field has been clicked. The field must have PickListFieldInfo.showEditAction set to true. */
readonly arcgisEditField: import("@arcgis/lumina").TargetedEvent;
/** @deprecated use arcgisChange instead */
readonly arcgisFieldPickListChange: import("@arcgis/lumina").TargetedEvent;
/** @deprecated use arcgisClose instead */
readonly arcgisFieldPickListDismissed: import("@arcgis/lumina").TargetedEvent;
/** @deprecated use arcgisSortByChange instead */
readonly arcgisFieldPickListSortByChange: import("@arcgis/lumina").TargetedEvent;
/** Emitted when the field pick list sort order has changed. */
readonly arcgisSortByChange: import("@arcgis/lumina").TargetedEvent;
readonly "@eventTypes": {
arcgisChange: ArcgisFieldPickList["arcgisChange"]["detail"];
arcgisClose: ArcgisFieldPickList["arcgisClose"]["detail"];
arcgisDeleteField: ArcgisFieldPickList["arcgisDeleteField"]["detail"];
arcgisEditField: ArcgisFieldPickList["arcgisEditField"]["detail"];
arcgisFieldPickListChange: ArcgisFieldPickList["arcgisFieldPickListChange"]["detail"];
arcgisFieldPickListDismissed: ArcgisFieldPickList["arcgisFieldPickListDismissed"]["detail"];
arcgisFieldPickListSortByChange: ArcgisFieldPickList["arcgisFieldPickListSortByChange"]["detail"];
arcgisSortByChange: ArcgisFieldPickList["arcgisSortByChange"]["detail"];
};
}
/** @internal */
export type LastSortBy = "default" | "display" | "field" | "type";