core/lib/tern_from_ts/defs/selectize.json
2017-05-14 13:22:31 +02:00

118 lines
3.6 KiB
JSON

{
"Selectize": {
"IOptions": {
"delimiter": "string",
"diacritics": "bool",
"create": "?",
"createOnBlur": "bool",
"createFilter": "?",
"highlight": "bool",
"persist": "bool",
"openOnFocus": "bool",
"maxOptions": "number",
"maxItems": "number",
"hideSelected": "bool",
"allowEmptyOption": "bool",
"scrollDuration": "number",
"loadThrottle": "number",
"preload": "?",
"dropdownParent": "string",
"addPrecedence": "bool",
"selectOnTab": "bool",
"plugins": "[string]",
"options": "[U]",
"dataAttr": "string",
"valueField": "string",
"optgroups": "[U]",
"optgroupValueField": "string",
"labelField": "string",
"optgroupLabelField": "string",
"optgroupField": "string",
"sortField": "?",
"searchField": "?",
"searchConjunction": "string",
"optgroupOrder": "[string]",
"copyClassesToDropdown": "bool",
"load": "fn(query: string, callback: Function) -> ?",
"score": "fn(search: ISearch) -> fn(item: ?)",
"onInitialize": "fn() -> ?",
"onChange": "fn(value: ?) -> ?",
"onItemAdd": "fn(value: T, item: JQuery) -> ?",
"onItemRemove": "fn(value: T) -> ?",
"onClear": "fn() -> ?",
"onDelete": "fn(values: [T]) -> ?",
"onOptionAdd": "fn(value: T, data: U) -> ?",
"onOptionRemove": "fn(value: T) -> ?",
"onDropdownOpen": "fn(dropdown: JQuery) -> ?",
"onDropdownClose": "fn(dropdown: JQuery) -> ?",
"onType": "fn(srt: string) -> ?",
"onLoad": "fn(data: [U]) -> ?",
"render": "?"
},
"ICustomRenderers": {
"option": "fn(data: U, escape: fn(input: string)) -> string",
"item": "fn(data: U, escape: fn(input: string)) -> string",
"option_create": "fn(data: U, escape: fn(input: string)) -> string",
"optgroup_header": "fn(data: U, escape: fn(input: string)) -> string",
"optgroup": "fn(data: U, escape: fn(input: string)) -> string"
},
"IApi": {
"addOption": "fn(data: U)",
"updateOption": "fn(value: T, data: U)",
"removeOption": "fn(value: T)",
"clearOptions": "fn()",
"getOption": "fn(value: T) -> ?",
"getAdjacentOption": "fn(value: T, direction: number)",
"refreshOptions": "fn(triggerDropdown: bool)",
"clear": "fn()",
"getItem": "fn(value: T) -> JQuery",
"addItem": "fn(value: T)",
"removeItem": "fn(value: T)",
"createItem": "fn(value: T)",
"refreshItems": "fn()",
"addOptionGroup": "fn(id: string, data: U)",
"on": "fn(eventName: string, handler: Function)",
"off": "fn(eventName: string, handler?: Function)",
"trigger": "fn(eventName: string, args: [?])",
"open": "fn()",
"close": "fn()",
"positionDropdown": "fn()",
"destroy": "fn()",
"load": "fn(callback: fn(results: ?))",
"focus": "fn()",
"blur": "fn()",
"lock": "fn()",
"unlock": "fn()",
"disable": "fn()",
"enable": "fn()",
"getValue": "fn() -> ?",
"setValue": "fn(value: T)",
"setCaret": "fn(index: number)",
"isFull": "fn() -> bool",
"clearCache": "fn(template?: string)"
},
"ISearchToken": {
"regex": "RegExp",
"string": "string"
},
"ISearchResult": {
"id": "string",
"score": "number"
},
"ISearch": {
"options": "?",
"query": "string",
"tokens": "[ISearchToken]",
"total": "number",
"items": "[ISearchResult]"
}
},
"JQuery": {
"selectize": "fn(options?: ?) -> JQuery"
},
"HTMLElement": {
"selectize": "?"
},
"!name": "selectize"
}