cv-dialog-sdk
Version:
Catavolt Dialog Javascript API
124 lines (123 loc) • 4.37 kB
TypeScript
import { EditorDialog } from './EditorDialog';
import { Property } from "./Property";
import { PropertyDef } from "./PropertyDef";
import { Redirection } from "./Redirection";
import { FilterOperator, SortDirection } from "./types";
export declare const FILTER_VALUE_SUFFIX: string;
export declare const FILTER_OPERATOR_SUFFIX: string;
export declare const SORT_DIRECTION_SUFFIX: string;
export declare const SORT_SEQUENCE_SUFFIX: string;
export declare const KEYWORD_PROPERTY_NAME: string;
export declare class SearchDialog extends EditorDialog {
/**
* Clear the search values currently in the buffer. Does not submit search.
*/
clearSearchValues(): void;
/**
* Clear the sort values currently in the buffer. Does not submit search.
*/
clearSortValues(): void;
/**
* Get the current search value for a property name, as a Property
* @param propName
*/
getSearchValuePropertyForName(propName: string): Property;
/**
* Get the PropertyDef associated with the search value Property
* @param propName
*/
getSearchValuePropertyDefForName(propName: string): PropertyDef;
getSearchablePropertyNames(): string[];
getSortablePropertyNames(): string[];
getPropertyNameForSearchPropertyName(searchPropertyName: string): string;
/**
* Get the current keyword search value. This is a global substring search
* across all properties
*/
getKeywordSearchValue(): Property;
/**
* Get the current search operator for a property name, as a Property
* @param propName
*/
getSearchOpPropertyForName(propName: string): Property;
/**
* Get the PropertyDef associated with the search operator Property
* @param propName
*/
getSearchOpPropertyDefForName(propName: string): PropertyDef;
/**
* Get the current sort direction for a property name, as a Property
* @param propName
*/
getSortDirectionPropertyForName(propName: string): Property;
/**
* Get the PropertyDef associated with the sort direction
* @param propName
*/
getSortDirectionPropertyDefForName(propName: string): PropertyDef;
/**
* Get the current sort priority for a property name, as a Property
* @param propName
*/
getSortPriorityPropertyForName(propName: string): Property;
/**
* Get the PropertyDef associated with the sort priority
* @param propName
*/
getSortPriorityPropertyDefForName(propName: string): PropertyDef;
/**
* Returns whether or not the sort direction for a property is set to ascending
* @param propName
*/
isAscending(propName: string): boolean;
/**
* Returns whether or not the sort direction for a property is set to descending
* @param propName
*/
isDescending(propName: string): boolean;
/**
* Reopen the search dialog for writing
*/
reopenSearch(): Promise<EditorDialog | Redirection>;
/**
* Set the sort direction for a property to ascending
* @param propName
* @param sortFieldPriority
*/
setAscending(propName: string, sortFieldPriority?: number): void;
/**
* Set the sort direction for a property to descending
* @param propName
* @param sortFieldPriority
*/
setDescending(propName: string, sortFieldPriority?: number): void;
/**
* Set the search value for a property
* @param propName
* @param searchValue
*/
setSearchValue(propName: string, searchValue: string): void;
/**
* Set the search value for the keyword search. This is a global substring search
* across all properties
* @param keyword
*/
setKeywordSearchValue(keyword: string): void;
/**
* Set the filter operator type for a property to one of [[FilterOperatorEnum]]
* @param propName
* @param operator
*/
setSearchValueOperation(propName: string, operator: FilterOperator): void;
/**
* Set the sort direction for a property to one of [[SortDirectionEnum]]
* @param propName
* @param sortDirection
* @param sortFieldPriority
*/
setSortValue(propName: string, sortDirection?: SortDirection, sortFieldPriority?: number): void;
/**
* Submit the search dialog (write)
*/
submitSearch(): Promise<EditorDialog | Redirection>;
}