layerpro 0.9.55 → 0.9.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -34
- package/docs/index.md +109 -34
- package/example/index.tsx +62 -0
- package/example/layerpro.scss +108 -0
- package/index.js +5 -5
- package/package.json +1 -1
- package/types/layerpro.d.ts +66 -90
package/package.json
CHANGED
package/types/layerpro.d.ts
CHANGED
|
@@ -17,111 +17,87 @@ declare function prompt(f1?: string, func1?: Function): any
|
|
|
17
17
|
|
|
18
18
|
////////////////////////////////////////////////////////////////////////////////////
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/** Add buttons */
|
|
20
|
+
interface GenLayerProps {
|
|
21
|
+
|
|
22
|
+
id: string
|
|
23
|
+
body?: any
|
|
24
|
+
name?: string
|
|
25
|
+
style?: any
|
|
26
|
+
class?: string
|
|
27
|
+
icon?: string
|
|
28
|
+
|
|
30
29
|
buttons?: {
|
|
31
30
|
confirm?: {
|
|
32
|
-
text: string
|
|
33
|
-
cb?:
|
|
34
|
-
}
|
|
31
|
+
text: string
|
|
32
|
+
cb?: () => void
|
|
33
|
+
}
|
|
35
34
|
cancel?: {
|
|
36
|
-
text: string
|
|
37
|
-
cb?:
|
|
35
|
+
text: string
|
|
36
|
+
cb?: () => void
|
|
38
37
|
}
|
|
39
|
-
}
|
|
40
|
-
/** Give the size in width px (exmple "500px") */
|
|
41
|
-
width: number,
|
|
42
|
-
/** Give the size in width px (exmple "300px") */
|
|
43
|
-
height: number,
|
|
44
|
-
/** icon from html symbol table */
|
|
45
|
-
icon?: string,
|
|
46
|
-
/** you want the top/right maximize button */
|
|
47
|
-
maximize?: boolean,
|
|
48
|
-
/** you want the top/right parking button */
|
|
49
|
-
iconize?: boolean,
|
|
50
|
-
/** you want the top/right close button */
|
|
51
|
-
close?: any,
|
|
52
|
-
/** you want at top of everything */
|
|
53
|
-
raised?: boolean,
|
|
54
|
-
/** move it? */
|
|
55
|
-
movable?: boolean,
|
|
56
|
-
/** resizable it? */
|
|
57
|
-
resizable?: boolean,
|
|
58
|
-
/** Run it maximized */
|
|
59
|
-
isMaximize?: boolean,
|
|
60
|
-
/** You want to see rthe layerpro dock */
|
|
61
|
-
dockable?: boolean,
|
|
62
|
-
/** You want to memorize last position */
|
|
63
|
-
store?: boolean,
|
|
64
|
-
/** Add timer to your popup */
|
|
65
|
-
timer?: number,
|
|
66
|
-
|
|
67
|
-
/** Position in to screen */
|
|
68
|
-
top?: number | string,
|
|
69
|
-
left?: number | string,
|
|
70
|
-
right?: number | string,
|
|
71
|
-
bottom?: number | string,
|
|
72
|
-
|
|
73
|
-
/** Max and Min sizes */
|
|
74
|
-
minWidth?: number | string,
|
|
75
|
-
maxWidth?: number | string,
|
|
76
|
-
minHeight?: number | string,
|
|
77
|
-
maxHeight?: number | string,
|
|
78
|
-
|
|
79
|
-
/** Fading time */
|
|
80
|
-
fadeIn?: number,
|
|
81
|
-
fadeOut?: number,
|
|
82
|
-
|
|
83
|
-
// TODO
|
|
84
|
-
source?: "",
|
|
85
|
-
className?: string,
|
|
86
|
-
style?: string
|
|
87
|
-
}
|
|
38
|
+
}
|
|
88
39
|
|
|
89
|
-
interface _layerpro {
|
|
90
40
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
readonly purge: (document: Document) => any
|
|
96
|
-
readonly credits: (txt: String) => any
|
|
97
|
-
readonly popup: {
|
|
41
|
+
top?: number | string
|
|
42
|
+
left?: number | string
|
|
43
|
+
right?: number | string
|
|
44
|
+
bottom?: number | string
|
|
98
45
|
|
|
99
|
-
|
|
46
|
+
width?: number | string
|
|
47
|
+
height?: number | string
|
|
100
48
|
|
|
101
|
-
|
|
102
|
-
|
|
49
|
+
minWidth?: number
|
|
50
|
+
minHeight?: number
|
|
51
|
+
maxWidth?: number
|
|
52
|
+
maxHeight?: number
|
|
103
53
|
|
|
104
|
-
|
|
105
|
-
|
|
54
|
+
fadeIn?: number
|
|
55
|
+
fadeOut?: number
|
|
56
|
+
timer?: number
|
|
106
57
|
|
|
107
|
-
|
|
58
|
+
maximize?: boolean
|
|
59
|
+
isMaximize?: boolean
|
|
60
|
+
dockable?: boolean
|
|
61
|
+
movable?: boolean
|
|
108
62
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// readonly movable: (value: any) => {}
|
|
114
|
-
// readonly resizable: (value: any) => {}
|
|
115
|
-
// readonly dockable: (value: any) => {}
|
|
116
|
-
// readonly store: (value: any) => {}
|
|
117
|
-
// readonly index: (value: any) => {}
|
|
118
|
-
// readonly zIndex: (value: any) => {}
|
|
119
|
-
}
|
|
63
|
+
resizable?: boolean
|
|
64
|
+
close?: boolean
|
|
65
|
+
raised?: boolean
|
|
66
|
+
iconize?: boolean
|
|
120
67
|
|
|
121
|
-
|
|
68
|
+
source?: string
|
|
69
|
+
store?: any
|
|
122
70
|
|
|
123
71
|
}
|
|
124
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Interface for the layerpro object
|
|
75
|
+
*/
|
|
76
|
+
interface _layerpro {
|
|
77
|
+
|
|
78
|
+
readonly alert: (txt: string) => void
|
|
79
|
+
readonly prompt: (txt: string, callback: (input: string) => void, event: Event) => void
|
|
80
|
+
readonly message: (txt: string, callback: () => void) => void
|
|
81
|
+
readonly confirm: (txt: string, yesCallback: () => void, noCallback: () => void) => void
|
|
82
|
+
readonly purge: (document: Document) => void
|
|
83
|
+
readonly credits: (txt: string) => void
|
|
84
|
+
|
|
85
|
+
readonly popup: {
|
|
86
|
+
readonly open: (props: GenLayerProps) => GenLayerProps
|
|
87
|
+
readonly center: (props: any) => void
|
|
88
|
+
readonly maximize: (props: any) => void
|
|
89
|
+
readonly iconize: (props: any) => void
|
|
90
|
+
readonly raised: (props: any) => void
|
|
91
|
+
readonly movable: (props: any) => void
|
|
92
|
+
readonly resizable: (props: any) => void
|
|
93
|
+
readonly dockable: (props: any) => void
|
|
94
|
+
readonly store: (props: any) => void
|
|
95
|
+
readonly index: (props: any) => void
|
|
96
|
+
readonly zIndex: (props: any) => number
|
|
97
|
+
readonly close: (props: any) => any
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
125
101
|
declare var layerpro: _layerpro
|
|
126
102
|
type layerpro = _layerpro
|
|
127
103
|
|