import * as React from 'react'; import { Platform } from '@go1d/mine/types/1search'; import ApolloClient, { WatchQueryFetchPolicy } from 'apollo-client'; import { ContentSet } from '@src/modules/shared/types/graphql'; import { Discover } from '@src/queries/types/Discover'; import { ContentType, DateRange, DiscoverPages, DisplayContext as DisplayContextType, DurationRange, LocationRange, PriceOptions, SortOption, TabOption, CollectionFilter, InOutOperator } from '../types/graphql-global-types'; type Client = ApolloClient; interface SearchProviderState { playlistId?: string; keyword?: string; prevKeyword?: string; sortOption: SortOption; tab: TabOption; contentTypes?: ContentType[]; includeSynonyms: boolean; durationRanges: DurationRange[]; tags: string[]; regionRelevances: string[]; providers: string[]; providerOp?: 'in' | 'out'; published?: number; topics: string[]; languages: string[]; pricing: PriceOptions[]; locales?: string[]; entryLevels?: string[]; mobileOptimized?: boolean; contentSet?: ContentSet[]; time: DateRange; location?: LocationRange; portal?: number; page?: DiscoverPages; marketplace?: boolean; authors?: string[]; collection?: CollectionFilter[]; collectionOp?: InOutOperator; adminView?: boolean; attachBookmark?: boolean; attributes?: Record; include?: string[]; includeMyAuthoredContent?: boolean; searchData: Discover; } export interface SearchSettings { playlistId?: string; keyword?: string; sortOption?: SortOption; tab?: TabOption; contentTypes?: ContentType[]; includeSynonyms?: boolean; durationRanges?: DurationRange[]; tags?: string[]; regionRelevances?: string[]; providers?: string[]; providerOp?: 'in' | 'out'; published?: number; topics?: string[]; languages?: string[]; mobileOptimized?: boolean; pricing?: PriceOptions[]; time?: DateRange; location?: LocationRange; portal?: number; page?: DiscoverPages; marketplace?: boolean; authors?: string[]; collection?: CollectionFilter[]; collectionOp?: InOutOperator; adminView?: boolean; attachBookmark?: boolean; attributes?: Record; include?: string[]; locales?: string[]; entryLevels?: string[]; contentSet?: ContentSet[]; includeMyAuthoredContent?: boolean; } interface SearchProviderProps { context: DisplayContextType; features?: any; onSettingsChange?: (params: SearchProviderState) => void; onCompleted?: (data: Discover) => void; controlledSettings?: SearchSettings; defaultSettings?: SearchSettings; ssr?: boolean; timezone?: string; skip?: boolean; fetchPolicy?: WatchQueryFetchPolicy; uiLanguage?: string; excludedTypes?: ContentType[]; attachBookmark?: boolean; platform?: Platform; apolloClient?: Client; apolloClientV2?: Client; omitResults?: boolean; } declare class SearchProvider extends React.PureComponent { private shouldTrackSearch; private cookies; private excludedTypes; state: SearchProviderState; constructor(props: SearchProviderProps); componentDidUpdate(prevProps: SearchProviderProps): void; propogatePropertyChange: () => void; setKeywordValue: (value: string) => void; handleSortChange: (sortOption: SortOption) => void; handleTabChange: (Tab: TabOption) => void; handleRemoveSynonyms: () => void; handleTagsChange: (Tags: any) => void; handleProvidersChange: (Providers: any) => void; handleTopicsChange: (Topics: any) => void; handleLanguagesChange: (Languages: any) => void; handlePricingChange: (Pricing: any) => void; handleEventTimeChange: (NewDateRange: DateRange) => void; handleLocationChange: (Location: LocationRange) => void; handleRegionRelevancesChange: (RegionRelevances: string[]) => void; private handleLocalesChange; private handleEntryLevelsChange; private handleMobileOptimizedChange; private handleContentSetChange; clearFilters: () => void; clearAll: () => void; private trackSearch; private attachQueryV2SearchData; render(): React.JSX.Element; private changeFilters; private handleDurationChange; } export default SearchProvider;