Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as React from "react";
import { t } from "i18next";
import { Button, Classes, MenuItem } from "@blueprintjs/core";
import { ISelectItemRendererProps, Select } from "@blueprintjs/labs";
import { DropDownItem } from "./fb_select";
import { NULL_CHOICE } from "./new_fb_select";
const SelectComponent = Select.ofType();
type PossibleReferences =
| "Sequences"
| "Regimens";
interface ParentMenu {
title: string;
value: string | number;
subMenus: DropDownItem[];
reference: PossibleReferences;
}
interface Props {
items: DropDownItem[];
selectedItem: DropDownItem;
onChange: (item: DropDownItem) => void;
import * as React from "react";
import { t } from "i18next";
import { Button, Classes, MenuItem } from "@blueprintjs/core";
import { ISelectItemRendererProps, Select } from "@blueprintjs/labs";
import { DropDownItem } from "./fb_select";
const SelectComponent = Select.ofType();
interface Props {
items: DropDownItem[];
selectedItem: DropDownItem;
onChange: (item: DropDownItem) => void;
nullChoice: DropDownItem;
}
interface State {
item?: DropDownItem | undefined;
minimal?: boolean;
resetOnSelect?: boolean;
}
export class FilterSearch extends React.Component> {
import * as React from "react";
import { Classes, MenuItem } from "@blueprintjs/core";
import { Omnibox } from "@blueprintjs/labs";
import { observer } from "mobx-react";
import classNames from "classnames";
import Fuse from "fuse.js";
import { Workspace } from "../stores/Workspace";
import ItBlockWithStatus from "../stores/ItBlock";
export interface QuickSearchProps {
workspace: Workspace;
}
const ItBlockOmniBox = Omnibox.ofType();
function QuickSearch({ workspace }: QuickSearchProps) {
let itemId = 0;
return (
}
itemRenderer={({ handleClick, isActive, item }) => {
if (!item) {
return <span>;
}
const classes = classNames({
[Classes.ACTIVE]: isActive,
[Classes.INTENT_PRIMARY]: isActive</span>
import ArtistComponent from 'components/ArtistComponent';
import {filter} from 'fuzzaldrin';
import {LibraryState} from 'definitions';
import * as PropTypes from 'prop-types';
import {PlayerActions} from '../../../player/actions.d';
require('./FuzzySelector.scss');
interface FuzzySelectorProps {
actions: LibraryActions & PlayerActions;
library: LibraryState;
}
type LibraryContent = string;
const ContentOmnibox = Omnibox.ofType();
@HotkeysTarget
export class FuzzySelector extends React.Component{
static contextTypes = {
router: PropTypes.shape({
history: PropTypes.shape({
push: PropTypes.func.isRequired,
replace: PropTypes.func.isRequired,
createHref: PropTypes.func.isRequired
}).isRequired
}).isRequired
}
constructor () {
super();
this.state = {};