///
import React = require("react");
import { ITokenizer, BaseApplicationComponent } from "@tandem/common";
export interface IKeyValueItem {
name: string;
readonly?: boolean;
value: any;
overridden?: boolean;
}
export interface IKeyValueInputComponentProps {
item: IKeyValueItem;
children?: any;
setKeyValue: (name: string, value: any, oldName?: string) => any;
onValueEnter: (item) => any;
className?: string;
renderName?: (props: IKeyValueNameComponentProps) => any;
valueTokenizer?: ITokenizer;
style?: any;
}
export interface IKeyValueNameComponentProps extends IKeyValueInputComponentProps {
children: any;
}
export declare class KeyValueInputComponent extends BaseApplicationComponent {
state: {
editName: boolean;
currentValue: any;
currentName: any;
};
editName: () => void;
onNameKeyDown: (event: React.KeyboardEvent) => void;
readonly item: IKeyValueItem;
saveName: (event: React.FocusEvent | React.KeyboardEvent) => any;
onNameBlur: (event: React.FocusEvent) => void;
onValueChange: (event: React.KeyboardEvent) => void;
readonly currentItemName: any;
onValueFocus: (event: React.FocusEvent) => void;
onValueBlur: (event: React.FocusEvent) => void;
onValueKeyDown: (event: React.KeyboardEvent) => void;
render(): JSX.Element;
}
export interface IKeyInputComponentProps {
items: IKeyValueItem[];
valueTokenizer?: ITokenizer;
renderName?: (props: IKeyValueNameComponentProps) => any;
setKeyValue: (key: string, value: string, oldKey?: string) => any;
renderItemComponent?: (props: IKeyValueInputComponentProps) => any;
}
export declare class HashInputComponent extends React.Component {
state: {
showNewInput: boolean;
};
onValueEnter: (item: any) => void;
render(): JSX.Element;
}