-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmvcct.enhancer.d.ts
140 lines (136 loc) · 5.24 KB
/
mvcct.enhancer.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
declare namespace mvcct {
export namespace enhancer {
export interface InputSupportOption {
force: boolean;
type: number;
}
export interface InputSupportOptions {
number?: InputSupportOption;
range?: InputSupportOption;
date?: InputSupportOption;
month?: InputSupportOption;
week?: InputSupportOption;
time?: InputSupportOption;
datetime?: InputSupportOption;
email?: InputSupportOption;
search?: InputSupportOption;
tel?: InputSupportOption;
url?: InputSupportOption;
color?: InputSupportOption;
}
export interface EnhancementProcessors{
number?: (node: HTMLElement, originalNode: HTMLElement) => void;
range?: (node: HTMLElement, originalNode: HTMLElement) => void;
date?: (node: HTMLElement, originalNode: HTMLElement) => void;
month?: (node: HTMLElement, originalNode: HTMLElement) => void;
week?: (node: HTMLElement, originalNode: HTMLElement) => void;
time?: (node: HTMLElement, originalNode: HTMLElement) => void;
datetime?: (node: HTMLElement, originalNode: HTMLElement) => void;
email?: (node: HTMLElement, originalNode: HTMLElement) => void;
search?: (node: HTMLElement, originalNode: HTMLElement) => void;
tel?: (node: HTMLElement, originalNode: HTMLElement) => void;
url?: (node: HTMLElement, originalNode: HTMLElement) => void;
color?: (node: HTMLElement, originalNode: HTMLElement) => void;
}
export interface Html5FallbackHandler{
replace?: (type: string, support: Html5InputSupport) => string;
fullReplace?: (HTMLElement) => void;
translateVal?: (value: string, type: string, node: HTMLHtmlElement) => string;
enhance?: EnhancementProcessors;
}
export interface BrowserSupportOptions {
fallbackHtml5?: boolean;
cookie?: string;
forms?: string;
fallbacks?: InputSupportOptions;
handlers?: Html5FallbackHandler;
}
export interface Html5InputOriginalSupport {
number: boolean;
range: boolean;
date: boolean;
month: boolean;
week: boolean;
time: boolean;
datetime: boolean;
email: boolean;
search: boolean;
tel: boolean;
url: boolean;
color: boolean;
}
export interface Html5InputSupport {
number: number;
range: number;
date: number;
month: number;
week: number;
time: number;
datetime: number;
email: number;
search: number;
tel: number;
url: number;
color: number;
}
export interface Html5InputFallbackWidgetsOptions{
number?: any;
range?: any;
date?: any;
month?: any;
week?: any;
time?: any;
datetime?: any;
email?: any;
search?: any;
tel?: any;
url?: any;
color?: any;
}
export interface Formats{
dateFormat?: string;
timeFormat?: string;
timeFormat1?: string;
datetimeFormat?: string;
datetimeFormat1?: string;
monthFormat?: string;
weekFormat?: string;
}
export interface Options {
browserSupport?: BrowserSupportOptions;
html5FallbackWidgets?: Html5InputFallbackWidgetsOptions;
editFormats?: Formats;
runReady?: boolean;
[propName: string]: any;
}
export interface Html5Infos {
Html5InputOriginalSupport: Html5InputOriginalSupport;
Html5InputSupport: Html5InputSupport;
}
export function init(options: Options): void;
export function waitAsync(options: Options): void;
export function asyncReady(): void;
export function register(
transform: (node: HTMLElement, isInitialize?: boolean) => void,
initialize: boolean,
processOptions: (options: Options) => void,
name: string,
preProcessOptions: (options: Options) => void,
type?: string): void;
export function transform(node: HTMLElement, types?: any): void;
export function dependency(name: string,
sourceNode: HTMLElement,
targetNode: HTMLElement,
eventNames: string[],
action: (targetNode: HTMLElement, sourceNode: HTMLElement) => void): any;
export function removeDependency(handle: any): void;
export function getSupport(): Html5Infos;
export function addBasicInput(Globalize: any);
export function format(type: string, value: any, invariant?: boolean): string;
export function parse(type: string, value: string, invariant?: boolean): any;
export function Globalize(): any;
}
}
declare module "mvcct.enhancer" {
export = mvcct.enhancer
}