Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
interface ISearchBoxWithPopoverDispatchProps {
onLoadMetadata: () => void;
onSearchItem: (item: IMetadata) => void;
}
interface IMetadataByType {
[x: string]: SearchBoxWithPopoverItem[];
}
interface ISearchHeader {
text: string;
}
type SearchBoxWithPopoverItem = ISearchHeader | IMetadata;
const SuggestWrapper = Suggest.ofType();
@HotkeysTarget
class SearchBoxWithPopover
extends React.Component {
private noResults = (
// TODO
// } else if (this.props.searchHistory.length > 0) {
// return ([{text: "Recent Searches (No results)"}] as SearchBoxWithPopoverItem[])
// .concat(this.props.searchHistory);
<menuitem for="" disabled="{true}">
);
</menuitem>
/* tslint:disable */
// Sadly this library is not ES6 module compatible
const Fuse = require('fuse.js')
/* tslint:enable */
interface IProps {
// The nodes to search
nodes: ReflectionObject[]
// Recently searched/selected nodes, to be shown as suggestions before the user starts searching
recent: ReadonlyArray
// Called when the user requests a type to be selected
onSelected: (fullName: string) => void
}
const NodeSuggest = Suggest.ofType()
// A component that provides a search field for types.
class TypeSearch extends React.PureComponent {
public render () {
return (
)
}
import { H5, MenuItem, Switch } from "@blueprintjs/core";
import { Example, IExampleProps } from "@blueprintjs/docs-theme";
import { Suggest } from "@blueprintjs/select";
import {
areFilmsEqual,
createFilm,
filmSelectProps,
IFilm,
maybeAddCreatedFilmToArrays,
maybeDeleteCreatedFilmFromArrays,
renderCreateFilmOption,
TOP_100_FILMS,
} from "./films";
const FilmSuggest = Suggest.ofType();
export interface ISuggestExampleState {
allowCreate: boolean;
closeOnSelect: boolean;
createdItems: IFilm[];
fill: boolean;
film: IFilm;
items: IFilm[];
minimal: boolean;
openOnKeyDown: boolean;
resetOnClose: boolean;
resetOnQuery: boolean;
resetOnSelect: boolean;
}
export class SuggestExample extends React.PureComponent {
import * as _ from 'lodash'
import pluralize from 'pluralize'
import * as React from 'react'
import BroadcasterSection from 'components/BroadcasterSection'
import ExternalLink from 'components/ExternalLink'
import NonIdealState from 'components/NonIdealState'
import Spinner from 'components/Spinner'
import { BroadcasterSectionProps } from 'containers/BroadcasterOverlay'
import Twitch, { RawGame, RawNotification } from 'libs/Twitch'
import styled, { theme } from 'styled'
/**
* Game suggest component.
*/
const GameSuggest = Suggest.ofType()
/**
* InfoInput component.
*/
const InfoInput = styled(InputGroup)`
.${Classes.DARK} & > .${Classes.INPUT}.${Classes.DISABLED}, .${Classes.DARK} & > .${Classes.INPUT}:disabled {
${theme('broadcaster.input.disabled')};
}
`
/**
* GameFormGroup component.
*/
const GameFormGroup = styled(FormGroup)`
width: 100%;
`