import { Component, ReactElement } from 'react'; import PropTypes from 'prop-types'; import type { Preset } from '@splunk/react-time-range/Dialog'; interface SplunkwebConnectorProps { children: any; presetsTransform: (presets: Preset[]) => Preset[]; /** * When set to true, `SplunkwebConnector` will check the user's capabilities to see if they can * spawn real-time searches. If they cannot, then the `realTimeDisabled` prop will be set to * `false` for its children, disabling real-time time ranges in `Dialog`. */ validateRTSearchCapability?: boolean; } type MomentTimeZone = { [key: string]: any; }; type TimeParseResult = { error?: any; iso?: string; time: string; }; type SplunkwebConnectorState = { momentTimeZone?: MomentTimeZone; parseLatest?: TimeParseResult; parseEarliest?: TimeParseResult; presets: Preset[]; realTimeDisabled: boolean; }; declare class SplunkwebConnector extends Component { static propTypes: { /** * Must be either a Time Range `Dialog` or `Dropdown`. */ children: PropTypes.Validator; /** * A function to transform presets before they are passed to the wrapped component. * Should accept and return a presets array. */ presetsTransform: PropTypes.Requireable<(...args: any[]) => any>; }; static defaultProps: { presetsTransform: (presets: Preset[]) => Preset[]; validateRTSearchCapability: boolean; }; static instances: SplunkwebConnector[]; static sharedPresets: Preset[]; static hashCode(str: string): number; private cancelableEarliestTimeParser; private cancelableLatestTimeParser; private cancelableFetchUserRTSearchCapability; constructor(props: SplunkwebConnectorProps); componentWillUnmount(): void; updatePresets(): void; handleRequestParseEarliest: (time: string) => void; handleRequestParseLatest: (time: string) => void; render(): ReactElement; } export default SplunkwebConnector;