Merge pull request #3699 from lokeshpeta/master

pull request for new MaskedInput and JQuery JqGrid
This commit is contained in:
Masahiro Wakame
2015-02-25 00:20:40 +09:00
8 changed files with 157 additions and 13 deletions
+6
View File
@@ -0,0 +1,6 @@
// Type definitions for jQuery jqgrid Plugin 1.3
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
/// <reference path="jqgrid.d.ts" />
+64
View File
@@ -0,0 +1,64 @@
// Type definitions for jQuery jqgrid Plugin 1.3
// Project: https://github.com/tonytomov/jqGrid
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
interface JQueryJqGridColumn {
name: string;
index: string;
hidden?: boolean;
sortable?: boolean;
search?: boolean;
width?: number;
formatter?: (cellvalue: any, options: any, rowObject: any) => any;
}
interface IJqGridJsonReader {
repeatitems: boolean;
root(obj: any): any;
page(obj: any): any;
total(obj: any): number;
records(obj: {data: any[]}): number;
}
interface JQueryJqGridOptions {
datatype?: string;
mtype?: string;
autoencode?: boolean;
pager?: string;
rowNum?: number;
rowList?: number[];
colNames?: string[];
colModel?: JQueryJqGridColumn[];
sortname?: string;
sortorder?: string;
multiselect?: boolean;
multiboxonly?: boolean;
forceFit?: boolean;
height?: number;
width?: number;
shrinkToFit?: boolean;
url?: string;
jsonReader?: IJqGridJsonReader;
gridComplete?:()=>void;
}
interface JQueryJqGridStatic {
(): JQuery;
(gridName: string): any;
(gridName: string, propName: string): any;
(gridName: string, obj: any): any;
(gridName: string, id: any, colname: any): any;
(options: JQueryJqGridOptions): JQuery;
}
interface JQueryStatic {
jqGrid?: JQueryJqGridStatic;
}
interface JQuery {
jqGrid?: JQueryJqGridStatic;
setGridParam(obj: any): void;
}
+1
View File
@@ -0,0 +1 @@
--noImplicitAny --module commonjs --target es5
+16 -13
View File
@@ -47,7 +47,6 @@ interface NotyCallbackOptions {
}
interface NotyStatic {
(notyOptions: NotyOptions);
defaults: NotyOptions;
@@ -57,23 +56,27 @@ interface NotyStatic {
closeAll();
setText(id: any, text: string);
setType(id: any, type: string);
}
interface Noty {
(notyOptions: NotyOptions);
show();
close();
setText(text: string);
setType(type: string);
setTimeout(timeout: number);
closed: boolean;
shown: boolean;
}
interface JQueryStatic {
noty: NotyStatic;
}
declare var noty: {
(notyOptions: NotyOptions);
show();
close();
setText(text: string);
setType(type: string);
setTimeout(timeout: number);
closed: boolean;
shown: boolean;
interface JQuery {
noty: Noty;
}
declare var noty: Noty;
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for Masked Input plugin for jQuery
// Project: http://digitalbush.com/projects/masked-input-plugin
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
///<reference path="maskedinput.d.ts" />
$("#test").inputmask("9:000");
$("#test").inputmask("9:000", { numeric: true });
var alies = $.inputmask.defaults.aliases;
+55
View File
@@ -0,0 +1,55 @@
// Type definitions for Masked Input plugin for jQuery
// Project: http://digitalbush.com/projects/masked-input-plugin
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
interface JQueryMaskedInputOptions {
mask?: string;
alias?: string;
placeholder?: string;
repeat?: number;
greedy?: boolean;
skipOptionalPartCharacter?: string;
clearIncomplete?: boolean;
clearMaskOnLostFocus?: boolean;
autoUnmask?: boolean;
showMaskOnFocus?: boolean;
showMaskOnHover?: boolean;
showToolTip?: boolean;
isComplete?: (buffer: any, options: any) => {};
numeric?: boolean;
radixPoint?: string;
rightAlignNumerics?: boolean;
oncomplete?: (value?: any) => void;
onincomplete?: () => void;
oncleared?: () => void;
onUnMask?: (maskedValue: any, unmaskedValue: any) => void;
onBeforeMask?: (initialValue: any) => void;
onKeyValidation?: (result: any) => void;
onBeforePaste?: (pastedValue: any) => void;
}
interface MaskedInputStatic {
defaults: MaskedInputDefaults;
isValid: (value: string, options: MaskedInputStaticDefaults) => boolean;
format: (value: string, options: MaskedInputStaticDefaults) => boolean;
}
interface MaskedInputStaticDefaults {
alias: string;
}
interface MaskedInputDefaults {
aliases: any;
definitions: any;
}
interface JQueryStatic {
inputmask: MaskedInputStatic;
}
interface JQuery {
inputmask(mask: string, options?: JQueryMaskedInputOptions): JQuery;
}
+1
View File
@@ -0,0 +1 @@
--noImplicitAny --module commonjs --target es5
+2
View File
@@ -3,6 +3,8 @@
// Definitions by: Ry Racherbaumer <http://github.com/rygine>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../underscore/underscore.d.ts" />
interface UnderscoreStatic {
str: UnderscoreStringStatic;
string: UnderscoreStringStatic;