layerpro 1.1.8 → 1.1.10
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/index.d.ts +9 -0
- package/package.json +1 -1
- package/types/jquery.d.ts +22 -0
- package/types/layerpro.d.ts +106 -0
package/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
layerpro
|
|
3
|
+
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
+
Licensed under MIT License, see
|
|
5
|
+
https://dario.passariello.ca
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
declare module 'jquery'
|
|
10
|
+
|
|
11
|
+
declare var $: any
|
|
12
|
+
declare var jQuery: any
|
|
13
|
+
|
|
14
|
+
// ////////////////////////////////////////////////////////////////
|
|
15
|
+
|
|
16
|
+
interface window {
|
|
17
|
+
$: any
|
|
18
|
+
jQuery: any
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type $ = {}
|
|
22
|
+
type jQuery = {}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
layerpro
|
|
3
|
+
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
+
Licensed under MIT License, see
|
|
5
|
+
https://dario.passariello.ca
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/** Generate custom alert using alert([text]) */
|
|
10
|
+
declare function alert(f1?: string): any
|
|
11
|
+
|
|
12
|
+
/** Generate custom confirm using confirm([text],[callback for YES],[optional callback for NO]) */
|
|
13
|
+
declare function confirm(message: string, func1: Function, func2?: Function): boolean
|
|
14
|
+
|
|
15
|
+
/** Generate custom message using message([text],[callback]) and option callback */
|
|
16
|
+
declare function message(f1?: string, func1?: Function): any
|
|
17
|
+
|
|
18
|
+
/** Generate custom message using message([text],[callback]) and option callback */
|
|
19
|
+
declare function prompt(f1?: string, func1?: Function): any
|
|
20
|
+
|
|
21
|
+
////////////////////////////////////////////////////////////////////////////////////
|
|
22
|
+
|
|
23
|
+
interface GenLayerProps {
|
|
24
|
+
|
|
25
|
+
id: string
|
|
26
|
+
body?: any
|
|
27
|
+
name?: string
|
|
28
|
+
style?: any
|
|
29
|
+
class?: string
|
|
30
|
+
icon?: string
|
|
31
|
+
|
|
32
|
+
buttons?: {
|
|
33
|
+
confirm?: {
|
|
34
|
+
text: string
|
|
35
|
+
cb?: () => void
|
|
36
|
+
}
|
|
37
|
+
cancel?: {
|
|
38
|
+
text: string
|
|
39
|
+
cb?: () => void
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
top?: number | string
|
|
44
|
+
left?: number | string
|
|
45
|
+
right?: number | string
|
|
46
|
+
bottom?: number | string
|
|
47
|
+
|
|
48
|
+
width?: number | string
|
|
49
|
+
height?: number | string
|
|
50
|
+
|
|
51
|
+
minWidth?: number
|
|
52
|
+
minHeight?: number
|
|
53
|
+
maxWidth?: number
|
|
54
|
+
maxHeight?: number
|
|
55
|
+
|
|
56
|
+
fadeIn?: number
|
|
57
|
+
fadeOut?: number
|
|
58
|
+
timer?: number
|
|
59
|
+
|
|
60
|
+
maximize?: boolean
|
|
61
|
+
isMaximize?: boolean
|
|
62
|
+
dockable?: boolean
|
|
63
|
+
movable?: boolean
|
|
64
|
+
|
|
65
|
+
resizable?: boolean
|
|
66
|
+
close?: boolean
|
|
67
|
+
raised?: boolean
|
|
68
|
+
iconize?: boolean
|
|
69
|
+
|
|
70
|
+
source?: string
|
|
71
|
+
store?: any
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Interface for the layerpro object
|
|
77
|
+
*/
|
|
78
|
+
interface _layerpro {
|
|
79
|
+
|
|
80
|
+
readonly alert: (txt: string) => void
|
|
81
|
+
readonly prompt: (txt: string, callback: (input: string) => void, event: Event) => void
|
|
82
|
+
readonly message: (txt: string, callback: () => void) => void
|
|
83
|
+
readonly confirm: (txt: string, yesCallback: () => void, noCallback: () => void) => void
|
|
84
|
+
readonly purge: (document: Document) => void
|
|
85
|
+
readonly credits: (txt: string) => void
|
|
86
|
+
|
|
87
|
+
readonly popup: {
|
|
88
|
+
readonly open: (props: GenLayerProps) => GenLayerProps
|
|
89
|
+
readonly center: (props: any) => void
|
|
90
|
+
readonly maximize: (props: any) => void
|
|
91
|
+
readonly iconize: (props: any) => void
|
|
92
|
+
readonly raised: (props: any) => void
|
|
93
|
+
readonly movable: (props: any) => void
|
|
94
|
+
readonly resizable: (props: any) => void
|
|
95
|
+
readonly dockable: (props: any) => void
|
|
96
|
+
readonly store: (props: any) => void
|
|
97
|
+
readonly index: (props: any) => void
|
|
98
|
+
readonly zIndex: (props: any) => number
|
|
99
|
+
readonly close: (props: any) => any
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare var layerpro: _layerpro
|
|
104
|
+
type layerpro = _layerpro
|
|
105
|
+
|
|
106
|
+
type process = {}
|