@empathyco/x-components
Version:
Empathy X Components
93 lines • 3.31 kB
TypeScript
import type { SearchRequest } from '@empathyco/x-types';
import type { PropType } from 'vue';
import type { QueryFeature } from '../../../types';
import type { QueryPreviewInfo } from '../store/types';
/**
* Retrieves a preview of the results of a query and exposes them in the default slot,
* along with the query preview and the totalResults of the search request.
* By default, it renders the names of the results.
*
* @public
*/
declare const _default: import("vue").DefineComponent<{
/** The information about the request of the query preview. */
queryPreviewInfo: {
type: PropType<QueryPreviewInfo>;
required: true;
};
/** The origin property for the request. */
queryFeature: {
type: PropType<QueryFeature>;
};
/** Number of query preview results to be rendered. */
maxItemsToRender: {
type: NumberConstructor;
};
/**
* Debounce time in milliseconds for triggering the search requests.
* It will default to 0 to fit the most common use case (pre-search),
* and it would work properly with a 250 value inside empathize.
*/
debounceTimeMs: {
type: NumberConstructor;
default: number;
};
/**
* Controls whether the QueryPreview should be removed from the state
* when the component is destroyed.
*/
persistInCache: {
type: BooleanConstructor;
default: boolean;
};
}, {
hasResults: import("vue").ComputedRef<boolean>;
queryPreviewResults: import("vue").ComputedRef<{
results: import("@empathyco/x-types").Result[];
request: SearchRequest;
displayTagging?: import("@empathyco/x-types").TaggingRequest;
queryTagging?: import("@empathyco/x-types").TaggingRequest;
totalResults: number;
instances: number;
status: import("../../..").RequestStatus;
} | undefined>;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("load" | "error")[], "load" | "error", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/** The information about the request of the query preview. */
queryPreviewInfo: {
type: PropType<QueryPreviewInfo>;
required: true;
};
/** The origin property for the request. */
queryFeature: {
type: PropType<QueryFeature>;
};
/** Number of query preview results to be rendered. */
maxItemsToRender: {
type: NumberConstructor;
};
/**
* Debounce time in milliseconds for triggering the search requests.
* It will default to 0 to fit the most common use case (pre-search),
* and it would work properly with a 250 value inside empathize.
*/
debounceTimeMs: {
type: NumberConstructor;
default: number;
};
/**
* Controls whether the QueryPreview should be removed from the state
* when the component is destroyed.
*/
persistInCache: {
type: BooleanConstructor;
default: boolean;
};
}>> & {
onLoad?: ((...args: any[]) => any) | undefined;
onError?: ((...args: any[]) => any) | undefined;
}, {
debounceTimeMs: number;
persistInCache: boolean;
}, {}>;
export default _default;
//# sourceMappingURL=query-preview.vue?vue&type=script&lang.d.ts.map