@whitesev/pops 2.4.6 → 2.4.7
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/dist/index.amd.js +578 -571
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +578 -571
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +578 -571
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +578 -571
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +578 -571
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +578 -571
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +252 -252
- package/dist/types/src/types/animation.d.ts +19 -19
- package/dist/types/src/types/button.d.ts +187 -187
- package/dist/types/src/types/components.d.ts +210 -210
- package/dist/types/src/types/event.d.ts +63 -63
- package/dist/types/src/types/global.d.ts +25 -25
- package/dist/types/src/types/icon.d.ts +32 -32
- package/dist/types/src/types/inst.d.ts +24 -24
- package/dist/types/src/types/main.d.ts +111 -111
- package/dist/types/src/types/mask.d.ts +49 -49
- package/dist/types/src/types/position.d.ts +60 -60
- package/index.ts +3 -0
- package/package.json +4 -2
- package/src/Pops.ts +206 -0
- package/src/PopsAnimation.ts +32 -0
- package/src/PopsCSS.ts +51 -0
- package/src/PopsCore.ts +64 -0
- package/src/PopsIcon.ts +95 -0
- package/src/PopsInst.ts +21 -0
- package/src/components/alert/config.ts +62 -0
- package/src/components/alert/index.css +0 -0
- package/src/components/alert/index.ts +163 -0
- package/src/components/alert/types/index.ts +23 -0
- package/src/components/confirm/config.ts +90 -0
- package/src/components/confirm/index.css +0 -0
- package/src/components/confirm/index.ts +166 -0
- package/src/components/confirm/types/index.ts +17 -0
- package/src/components/drawer/config.ts +89 -0
- package/src/components/drawer/index.css +37 -0
- package/src/components/drawer/index.ts +237 -0
- package/src/components/drawer/types/index.ts +61 -0
- package/src/components/folder/config.ts +147 -0
- package/src/components/folder/folderIcon.ts +28 -0
- package/src/components/folder/index.css +303 -0
- package/src/components/folder/index.ts +929 -0
- package/src/components/folder/types/index.ts +97 -0
- package/src/components/iframe/config.ts +60 -0
- package/src/components/iframe/index.css +76 -0
- package/src/components/iframe/index.ts +334 -0
- package/src/components/iframe/types/index.ts +139 -0
- package/src/components/loading/config.ts +29 -0
- package/src/components/loading/index.css +66 -0
- package/src/components/loading/index.ts +99 -0
- package/src/components/loading/types/index.ts +34 -0
- package/src/components/panel/config.ts +519 -0
- package/src/components/panel/handlerComponents.ts +2900 -0
- package/src/components/panel/index.css +1222 -0
- package/src/components/panel/index.ts +207 -0
- package/src/components/panel/types/components-button.ts +68 -0
- package/src/components/panel/types/components-common.ts +50 -0
- package/src/components/panel/types/components-deepMenu.ts +84 -0
- package/src/components/panel/types/components-forms.ts +44 -0
- package/src/components/panel/types/components-input.ts +78 -0
- package/src/components/panel/types/components-own.ts +30 -0
- package/src/components/panel/types/components-select.ts +93 -0
- package/src/components/panel/types/components-selectMultiple.ts +130 -0
- package/src/components/panel/types/components-slider.ts +77 -0
- package/src/components/panel/types/components-switch.ts +56 -0
- package/src/components/panel/types/components-textarea.ts +68 -0
- package/src/components/panel/types/index.ts +177 -0
- package/src/components/prompt/config.ts +94 -0
- package/src/components/prompt/index.css +34 -0
- package/src/components/prompt/index.ts +216 -0
- package/src/components/prompt/types/index.ts +55 -0
- package/src/components/rightClickMenu/config.ts +98 -0
- package/src/components/rightClickMenu/index.css +112 -0
- package/src/components/rightClickMenu/index.ts +602 -0
- package/src/components/rightClickMenu/types/index.ts +97 -0
- package/src/components/searchSuggestion/config.ts +56 -0
- package/src/components/searchSuggestion/index.ts +856 -0
- package/src/components/searchSuggestion/types/index.ts +239 -0
- package/src/components/tooltip/config.ts +34 -0
- package/src/components/tooltip/index.css +199 -0
- package/src/components/tooltip/index.ts +604 -0
- package/src/components/tooltip/types/index.ts +117 -0
- package/src/config/CommonCSSClassName.ts +17 -0
- package/src/config/GlobalConfig.ts +63 -0
- package/src/css/animation.css +987 -0
- package/src/css/button.css +551 -0
- package/src/css/common.css +48 -0
- package/src/css/index.css +253 -0
- package/src/css/ninePalaceGridPosition.css +50 -0
- package/src/css/scrollbar.css +22 -0
- package/src/handler/PopsElementHandler.ts +304 -0
- package/src/handler/PopsHandler.ts +589 -0
- package/src/svg/arrowLeft.svg +4 -0
- package/src/svg/arrowRight.svg +4 -0
- package/src/svg/chromeFilled.svg +11 -0
- package/src/svg/circleClose.svg +8 -0
- package/src/svg/close.svg +5 -0
- package/src/svg/cpu.svg +8 -0
- package/src/svg/delete.svg +5 -0
- package/src/svg/documentCopy.svg +5 -0
- package/src/svg/edit.svg +8 -0
- package/src/svg/eleme.svg +5 -0
- package/src/svg/elemePlus.svg +5 -0
- package/src/svg/headset.svg +5 -0
- package/src/svg/hide.svg +8 -0
- package/src/svg/keyboard.svg +8 -0
- package/src/svg/loading.svg +5 -0
- package/src/svg/max.svg +5 -0
- package/src/svg/min.svg +5 -0
- package/src/svg/mise.svg +5 -0
- package/src/svg/monitor.svg +5 -0
- package/src/svg/next.svg +5 -0
- package/src/svg/picture.svg +8 -0
- package/src/svg/prev.svg +5 -0
- package/src/svg/search.svg +5 -0
- package/src/svg/share.svg +5 -0
- package/src/svg/upload.svg +5 -0
- package/src/svg/videoPause.svg +5 -0
- package/src/svg/videoPlay.svg +5 -0
- package/src/svg/view.svg +5 -0
- package/src/types/PopsDOMUtilsEventType.d.ts +252 -0
- package/src/types/animation.d.ts +19 -0
- package/src/types/button.d.ts +187 -0
- package/src/types/components.d.ts +210 -0
- package/src/types/event.d.ts +63 -0
- package/src/types/global.d.ts +25 -0
- package/src/types/icon.d.ts +32 -0
- package/src/types/inst.d.ts +24 -0
- package/src/types/main.d.ts +111 -0
- package/src/types/mask.d.ts +49 -0
- package/src/types/position.d.ts +60 -0
- package/src/utils/PopsDOMUtils.ts +2408 -0
- package/src/utils/PopsDOMUtilsEventsConfig.ts +4 -0
- package/src/utils/PopsInstanceUtils.ts +688 -0
- package/src/utils/PopsMathUtils.ts +71 -0
- package/src/utils/PopsSafeUtils.ts +22 -0
- package/src/utils/PopsUtils.ts +406 -0
|
@@ -1,252 +1,252 @@
|
|
|
1
|
-
export type PopsDOMUtilsEventObject<T extends Node> = Event & {
|
|
2
|
-
target: T;
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
export type PopsDOMUtilsCreateElementAttributesMap = {
|
|
6
|
-
style?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
class?: string;
|
|
9
|
-
"data-"?: string;
|
|
10
|
-
type?: string;
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* 鼠标事件
|
|
15
|
-
* + https://blog.csdn.net/weixin_68658847/article/details/126939879
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export interface PopsDOMUtils_MouseEvent {
|
|
19
|
-
click: MouseEvent | PointerEvent;
|
|
20
|
-
contextmenu: MouseEvent | PointerEvent;
|
|
21
|
-
dblclick: MouseEvent | PointerEvent;
|
|
22
|
-
mousedown: MouseEvent | PointerEvent;
|
|
23
|
-
mouseenter: MouseEvent | PointerEvent;
|
|
24
|
-
mouseleave: MouseEvent | PointerEvent;
|
|
25
|
-
mousemove: MouseEvent | PointerEvent;
|
|
26
|
-
mouseover: MouseEvent | PointerEvent;
|
|
27
|
-
mouseout: MouseEvent | PointerEvent;
|
|
28
|
-
mouseup: MouseEvent | PointerEvent;
|
|
29
|
-
hover: MouseEvent;
|
|
30
|
-
}
|
|
31
|
-
export type PopsDOMUtils_MouseEventType = keyof PopsDOMUtils_MouseEvent;
|
|
32
|
-
/**
|
|
33
|
-
* 鼠标事件
|
|
34
|
-
*/
|
|
35
|
-
export interface PopsDOMUtils_KeyboardEvent {
|
|
36
|
-
keydown: KeyboardEvent;
|
|
37
|
-
keypress: KeyboardEvent;
|
|
38
|
-
keyup: KeyboardEvent;
|
|
39
|
-
}
|
|
40
|
-
export type PopsDOMUtils_KeyboardEventType = keyof PopsDOMUtils_KeyboardEvent;
|
|
41
|
-
/**
|
|
42
|
-
* 框架/对象事件
|
|
43
|
-
*/
|
|
44
|
-
export interface PopsDOMUtils_Frame_Object_Event {
|
|
45
|
-
abort: Event;
|
|
46
|
-
beforeunload: Event;
|
|
47
|
-
error: Event;
|
|
48
|
-
hashchange: Event;
|
|
49
|
-
load: Event;
|
|
50
|
-
pageshow: Event;
|
|
51
|
-
pagehide: Event;
|
|
52
|
-
resize: Event;
|
|
53
|
-
scroll: Event;
|
|
54
|
-
unload: Event;
|
|
55
|
-
}
|
|
56
|
-
export type PopsDOMUtils_Frame_Object_EventType = keyof PopsDOMUtils_Frame_Object_Event;
|
|
57
|
-
/**
|
|
58
|
-
* 表单事件
|
|
59
|
-
*/
|
|
60
|
-
export interface PopsDOMUtils_FormEvent {
|
|
61
|
-
blur: Event;
|
|
62
|
-
change: Event;
|
|
63
|
-
focus: Event;
|
|
64
|
-
focusin: Event;
|
|
65
|
-
focusout: Event;
|
|
66
|
-
input: Event;
|
|
67
|
-
reset: Event;
|
|
68
|
-
search: Event;
|
|
69
|
-
}
|
|
70
|
-
export type PopsDOMUtils_FormEventType = keyof PopsDOMUtils_FormEvent;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* 剪贴板事件
|
|
74
|
-
*/
|
|
75
|
-
export interface PopsDOMUtils_ClipboardEvent {
|
|
76
|
-
copy: ClipboardEvent;
|
|
77
|
-
cut: ClipboardEvent;
|
|
78
|
-
paste: ClipboardEvent;
|
|
79
|
-
}
|
|
80
|
-
export type PopsDOMUtils_ClipboardEventType = keyof PopsDOMUtils_ClipboardEvent;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* 打印事件
|
|
84
|
-
*/
|
|
85
|
-
export interface PopsDOMUtils_PrintEvent {
|
|
86
|
-
afterprint: Event;
|
|
87
|
-
beforeprint: Event;
|
|
88
|
-
}
|
|
89
|
-
export type PopsDOMUtils_PrintEventType = keyof PopsDOMUtils_PrintEvent;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* 拖动事件
|
|
93
|
-
*/
|
|
94
|
-
export interface PopsDOMUtils_DragEvent {
|
|
95
|
-
drag: DragEvent;
|
|
96
|
-
dragend: DragEvent;
|
|
97
|
-
dragenter: DragEvent;
|
|
98
|
-
dragleave: DragEvent;
|
|
99
|
-
dragover: DragEvent;
|
|
100
|
-
dragstart: DragEvent;
|
|
101
|
-
drop: DragEvent;
|
|
102
|
-
}
|
|
103
|
-
export type PopsDOMUtils_DragEventType = keyof PopsDOMUtils_DragEvent;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 多媒体(Media)事件
|
|
107
|
-
*/
|
|
108
|
-
export interface PopsDOMUtils_MediaEvent {
|
|
109
|
-
abort: Event;
|
|
110
|
-
canplay: Event;
|
|
111
|
-
canplaythrough: Event;
|
|
112
|
-
durationchange: Event;
|
|
113
|
-
emptied: Event;
|
|
114
|
-
ended: Event;
|
|
115
|
-
error: Event;
|
|
116
|
-
loadeddata: Event;
|
|
117
|
-
loadedmetadata: Event;
|
|
118
|
-
loadstart: Event;
|
|
119
|
-
pause: Event;
|
|
120
|
-
play: Event;
|
|
121
|
-
playing: Event;
|
|
122
|
-
progress: Event;
|
|
123
|
-
ratechange: Event;
|
|
124
|
-
seeked: Event;
|
|
125
|
-
seeking: Event;
|
|
126
|
-
stalled: Event;
|
|
127
|
-
suspend: Event;
|
|
128
|
-
timeupdate: Event;
|
|
129
|
-
volumechange: Event;
|
|
130
|
-
waiting: Event;
|
|
131
|
-
}
|
|
132
|
-
export type PopsDOMUtils_MediaEventType = keyof PopsDOMUtils_MediaEvent;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* 动画事件
|
|
136
|
-
*/
|
|
137
|
-
export interface PopsDOMUtils_AnimationEvent {
|
|
138
|
-
animationend: AnimationEvent;
|
|
139
|
-
animationiteration: AnimationEvent;
|
|
140
|
-
animationstart: AnimationEvent;
|
|
141
|
-
}
|
|
142
|
-
export type PopsDOMUtils_AnimationEventType = keyof PopsDOMUtils_AnimationEvent;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* 过渡事件
|
|
146
|
-
*/
|
|
147
|
-
export interface PopsDOMUtils_TransitionEvent {
|
|
148
|
-
transitionend: TransitionEvent;
|
|
149
|
-
}
|
|
150
|
-
export type PopsDOMUtils_TransitionEventType = keyof PopsDOMUtils_TransitionEvent;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* 触摸事件
|
|
154
|
-
*/
|
|
155
|
-
export interface PopsDOMUtils_TouchEvent {
|
|
156
|
-
touchstart: TouchEvent;
|
|
157
|
-
touchmove: TouchEvent;
|
|
158
|
-
touchend: TouchEvent;
|
|
159
|
-
touchcancel: TouchEvent;
|
|
160
|
-
touchenter: TouchEvent;
|
|
161
|
-
touchleave: TouchEvent;
|
|
162
|
-
}
|
|
163
|
-
export type PopsDOMUtils_TouchEventType = keyof PopsDOMUtils_TouchEvent;
|
|
164
|
-
/**
|
|
165
|
-
* 其它事件
|
|
166
|
-
*/
|
|
167
|
-
export interface PopsDOMUtils_OtherEvent {
|
|
168
|
-
message: Event;
|
|
169
|
-
online: Event;
|
|
170
|
-
offline: Event;
|
|
171
|
-
popstate: Event;
|
|
172
|
-
show: Event;
|
|
173
|
-
storage: Event;
|
|
174
|
-
toggle: Event;
|
|
175
|
-
wheel: Event;
|
|
176
|
-
propertychange: Event;
|
|
177
|
-
fullscreenchange: Event;
|
|
178
|
-
DOMContentLoaded: Event;
|
|
179
|
-
}
|
|
180
|
-
export type PopsDOMUtils_OtherEventType = keyof PopsDOMUtils_OtherEvent;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* 全部事件
|
|
184
|
-
*/
|
|
185
|
-
export type PopsDOMUtils_Event = PopsDOMUtils_MouseEvent &
|
|
186
|
-
PopsDOMUtils_KeyboardEvent &
|
|
187
|
-
PopsDOMUtils_Frame_Object_Event &
|
|
188
|
-
PopsDOMUtils_FormEvent &
|
|
189
|
-
PopsDOMUtils_ClipboardEvent &
|
|
190
|
-
PopsDOMUtils_PrintEvent &
|
|
191
|
-
PopsDOMUtils_DragEvent &
|
|
192
|
-
PopsDOMUtils_MediaEvent &
|
|
193
|
-
PopsDOMUtils_AnimationEvent &
|
|
194
|
-
PopsDOMUtils_TransitionEvent &
|
|
195
|
-
PopsDOMUtils_TouchEvent &
|
|
196
|
-
PopsDOMUtils_OtherEvent;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* 事件类型
|
|
200
|
-
*/
|
|
201
|
-
export type PopsDOMUtils_EventType = keyof PopsDOMUtils_Event;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* 元素上的events属性
|
|
205
|
-
*/
|
|
206
|
-
export declare interface PopsDOMUtilsEventListenerOptionsAttribute {
|
|
207
|
-
/**
|
|
208
|
-
* DOMUtils的ownCallBack,元素上的监听事件就是它,移除事件时也需要传入这个函数
|
|
209
|
-
*/
|
|
210
|
-
callback: (event: Event) => void;
|
|
211
|
-
/**
|
|
212
|
-
* 属性配置
|
|
213
|
-
*/
|
|
214
|
-
option: PopsDOMUtilsEventListenerOption;
|
|
215
|
-
/**
|
|
216
|
-
* 用户添加的事件
|
|
217
|
-
*/
|
|
218
|
-
originCallBack: (event: Event, selectorTarget?: HTMLElement) => void;
|
|
219
|
-
/**
|
|
220
|
-
* 子元素选择器
|
|
221
|
-
*/
|
|
222
|
-
selector?: string[];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export type PopsDOMUtilsElementEventType =
|
|
226
|
-
| HTMLElement
|
|
227
|
-
| string
|
|
228
|
-
| NodeList
|
|
229
|
-
| (HTMLElement | Window | Document | Element | typeof globalThis)[]
|
|
230
|
-
| Window
|
|
231
|
-
| Document
|
|
232
|
-
| Element
|
|
233
|
-
| null
|
|
234
|
-
| typeof globalThis
|
|
235
|
-
| ShadowRoot
|
|
236
|
-
| EventTarget
|
|
237
|
-
| ChildNode
|
|
238
|
-
| Node;
|
|
239
|
-
|
|
240
|
-
export type ParseHTMLReturnType<T1, T2> = T1 extends true ? (T2 extends true ? Document : HTMLElement) : HTMLElement;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* 事件的额外配置
|
|
244
|
-
*/
|
|
245
|
-
export declare type PopsDOMUtilsEventListenerOption = AddEventListenerOptions & {
|
|
246
|
-
/**
|
|
247
|
-
* 是否使用 event.composedPath() 来代替 event.target
|
|
248
|
-
*
|
|
249
|
-
* 一般用于设置了selector参数
|
|
250
|
-
*/
|
|
251
|
-
isComposedPath?: boolean;
|
|
252
|
-
};
|
|
1
|
+
export type PopsDOMUtilsEventObject<T extends Node> = Event & {
|
|
2
|
+
target: T;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
export type PopsDOMUtilsCreateElementAttributesMap = {
|
|
6
|
+
style?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
"data-"?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 鼠标事件
|
|
15
|
+
* + https://blog.csdn.net/weixin_68658847/article/details/126939879
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export interface PopsDOMUtils_MouseEvent {
|
|
19
|
+
click: MouseEvent | PointerEvent;
|
|
20
|
+
contextmenu: MouseEvent | PointerEvent;
|
|
21
|
+
dblclick: MouseEvent | PointerEvent;
|
|
22
|
+
mousedown: MouseEvent | PointerEvent;
|
|
23
|
+
mouseenter: MouseEvent | PointerEvent;
|
|
24
|
+
mouseleave: MouseEvent | PointerEvent;
|
|
25
|
+
mousemove: MouseEvent | PointerEvent;
|
|
26
|
+
mouseover: MouseEvent | PointerEvent;
|
|
27
|
+
mouseout: MouseEvent | PointerEvent;
|
|
28
|
+
mouseup: MouseEvent | PointerEvent;
|
|
29
|
+
hover: MouseEvent;
|
|
30
|
+
}
|
|
31
|
+
export type PopsDOMUtils_MouseEventType = keyof PopsDOMUtils_MouseEvent;
|
|
32
|
+
/**
|
|
33
|
+
* 鼠标事件
|
|
34
|
+
*/
|
|
35
|
+
export interface PopsDOMUtils_KeyboardEvent {
|
|
36
|
+
keydown: KeyboardEvent;
|
|
37
|
+
keypress: KeyboardEvent;
|
|
38
|
+
keyup: KeyboardEvent;
|
|
39
|
+
}
|
|
40
|
+
export type PopsDOMUtils_KeyboardEventType = keyof PopsDOMUtils_KeyboardEvent;
|
|
41
|
+
/**
|
|
42
|
+
* 框架/对象事件
|
|
43
|
+
*/
|
|
44
|
+
export interface PopsDOMUtils_Frame_Object_Event {
|
|
45
|
+
abort: Event;
|
|
46
|
+
beforeunload: Event;
|
|
47
|
+
error: Event;
|
|
48
|
+
hashchange: Event;
|
|
49
|
+
load: Event;
|
|
50
|
+
pageshow: Event;
|
|
51
|
+
pagehide: Event;
|
|
52
|
+
resize: Event;
|
|
53
|
+
scroll: Event;
|
|
54
|
+
unload: Event;
|
|
55
|
+
}
|
|
56
|
+
export type PopsDOMUtils_Frame_Object_EventType = keyof PopsDOMUtils_Frame_Object_Event;
|
|
57
|
+
/**
|
|
58
|
+
* 表单事件
|
|
59
|
+
*/
|
|
60
|
+
export interface PopsDOMUtils_FormEvent {
|
|
61
|
+
blur: Event;
|
|
62
|
+
change: Event;
|
|
63
|
+
focus: Event;
|
|
64
|
+
focusin: Event;
|
|
65
|
+
focusout: Event;
|
|
66
|
+
input: Event;
|
|
67
|
+
reset: Event;
|
|
68
|
+
search: Event;
|
|
69
|
+
}
|
|
70
|
+
export type PopsDOMUtils_FormEventType = keyof PopsDOMUtils_FormEvent;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 剪贴板事件
|
|
74
|
+
*/
|
|
75
|
+
export interface PopsDOMUtils_ClipboardEvent {
|
|
76
|
+
copy: ClipboardEvent;
|
|
77
|
+
cut: ClipboardEvent;
|
|
78
|
+
paste: ClipboardEvent;
|
|
79
|
+
}
|
|
80
|
+
export type PopsDOMUtils_ClipboardEventType = keyof PopsDOMUtils_ClipboardEvent;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 打印事件
|
|
84
|
+
*/
|
|
85
|
+
export interface PopsDOMUtils_PrintEvent {
|
|
86
|
+
afterprint: Event;
|
|
87
|
+
beforeprint: Event;
|
|
88
|
+
}
|
|
89
|
+
export type PopsDOMUtils_PrintEventType = keyof PopsDOMUtils_PrintEvent;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 拖动事件
|
|
93
|
+
*/
|
|
94
|
+
export interface PopsDOMUtils_DragEvent {
|
|
95
|
+
drag: DragEvent;
|
|
96
|
+
dragend: DragEvent;
|
|
97
|
+
dragenter: DragEvent;
|
|
98
|
+
dragleave: DragEvent;
|
|
99
|
+
dragover: DragEvent;
|
|
100
|
+
dragstart: DragEvent;
|
|
101
|
+
drop: DragEvent;
|
|
102
|
+
}
|
|
103
|
+
export type PopsDOMUtils_DragEventType = keyof PopsDOMUtils_DragEvent;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 多媒体(Media)事件
|
|
107
|
+
*/
|
|
108
|
+
export interface PopsDOMUtils_MediaEvent {
|
|
109
|
+
abort: Event;
|
|
110
|
+
canplay: Event;
|
|
111
|
+
canplaythrough: Event;
|
|
112
|
+
durationchange: Event;
|
|
113
|
+
emptied: Event;
|
|
114
|
+
ended: Event;
|
|
115
|
+
error: Event;
|
|
116
|
+
loadeddata: Event;
|
|
117
|
+
loadedmetadata: Event;
|
|
118
|
+
loadstart: Event;
|
|
119
|
+
pause: Event;
|
|
120
|
+
play: Event;
|
|
121
|
+
playing: Event;
|
|
122
|
+
progress: Event;
|
|
123
|
+
ratechange: Event;
|
|
124
|
+
seeked: Event;
|
|
125
|
+
seeking: Event;
|
|
126
|
+
stalled: Event;
|
|
127
|
+
suspend: Event;
|
|
128
|
+
timeupdate: Event;
|
|
129
|
+
volumechange: Event;
|
|
130
|
+
waiting: Event;
|
|
131
|
+
}
|
|
132
|
+
export type PopsDOMUtils_MediaEventType = keyof PopsDOMUtils_MediaEvent;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 动画事件
|
|
136
|
+
*/
|
|
137
|
+
export interface PopsDOMUtils_AnimationEvent {
|
|
138
|
+
animationend: AnimationEvent;
|
|
139
|
+
animationiteration: AnimationEvent;
|
|
140
|
+
animationstart: AnimationEvent;
|
|
141
|
+
}
|
|
142
|
+
export type PopsDOMUtils_AnimationEventType = keyof PopsDOMUtils_AnimationEvent;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 过渡事件
|
|
146
|
+
*/
|
|
147
|
+
export interface PopsDOMUtils_TransitionEvent {
|
|
148
|
+
transitionend: TransitionEvent;
|
|
149
|
+
}
|
|
150
|
+
export type PopsDOMUtils_TransitionEventType = keyof PopsDOMUtils_TransitionEvent;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 触摸事件
|
|
154
|
+
*/
|
|
155
|
+
export interface PopsDOMUtils_TouchEvent {
|
|
156
|
+
touchstart: TouchEvent;
|
|
157
|
+
touchmove: TouchEvent;
|
|
158
|
+
touchend: TouchEvent;
|
|
159
|
+
touchcancel: TouchEvent;
|
|
160
|
+
touchenter: TouchEvent;
|
|
161
|
+
touchleave: TouchEvent;
|
|
162
|
+
}
|
|
163
|
+
export type PopsDOMUtils_TouchEventType = keyof PopsDOMUtils_TouchEvent;
|
|
164
|
+
/**
|
|
165
|
+
* 其它事件
|
|
166
|
+
*/
|
|
167
|
+
export interface PopsDOMUtils_OtherEvent {
|
|
168
|
+
message: Event;
|
|
169
|
+
online: Event;
|
|
170
|
+
offline: Event;
|
|
171
|
+
popstate: Event;
|
|
172
|
+
show: Event;
|
|
173
|
+
storage: Event;
|
|
174
|
+
toggle: Event;
|
|
175
|
+
wheel: Event;
|
|
176
|
+
propertychange: Event;
|
|
177
|
+
fullscreenchange: Event;
|
|
178
|
+
DOMContentLoaded: Event;
|
|
179
|
+
}
|
|
180
|
+
export type PopsDOMUtils_OtherEventType = keyof PopsDOMUtils_OtherEvent;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 全部事件
|
|
184
|
+
*/
|
|
185
|
+
export type PopsDOMUtils_Event = PopsDOMUtils_MouseEvent &
|
|
186
|
+
PopsDOMUtils_KeyboardEvent &
|
|
187
|
+
PopsDOMUtils_Frame_Object_Event &
|
|
188
|
+
PopsDOMUtils_FormEvent &
|
|
189
|
+
PopsDOMUtils_ClipboardEvent &
|
|
190
|
+
PopsDOMUtils_PrintEvent &
|
|
191
|
+
PopsDOMUtils_DragEvent &
|
|
192
|
+
PopsDOMUtils_MediaEvent &
|
|
193
|
+
PopsDOMUtils_AnimationEvent &
|
|
194
|
+
PopsDOMUtils_TransitionEvent &
|
|
195
|
+
PopsDOMUtils_TouchEvent &
|
|
196
|
+
PopsDOMUtils_OtherEvent;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 事件类型
|
|
200
|
+
*/
|
|
201
|
+
export type PopsDOMUtils_EventType = keyof PopsDOMUtils_Event;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* 元素上的events属性
|
|
205
|
+
*/
|
|
206
|
+
export declare interface PopsDOMUtilsEventListenerOptionsAttribute {
|
|
207
|
+
/**
|
|
208
|
+
* DOMUtils的ownCallBack,元素上的监听事件就是它,移除事件时也需要传入这个函数
|
|
209
|
+
*/
|
|
210
|
+
callback: (event: Event) => void;
|
|
211
|
+
/**
|
|
212
|
+
* 属性配置
|
|
213
|
+
*/
|
|
214
|
+
option: PopsDOMUtilsEventListenerOption;
|
|
215
|
+
/**
|
|
216
|
+
* 用户添加的事件
|
|
217
|
+
*/
|
|
218
|
+
originCallBack: (event: Event, selectorTarget?: HTMLElement) => void;
|
|
219
|
+
/**
|
|
220
|
+
* 子元素选择器
|
|
221
|
+
*/
|
|
222
|
+
selector?: string[];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type PopsDOMUtilsElementEventType =
|
|
226
|
+
| HTMLElement
|
|
227
|
+
| string
|
|
228
|
+
| NodeList
|
|
229
|
+
| (HTMLElement | Window | Document | Element | typeof globalThis)[]
|
|
230
|
+
| Window
|
|
231
|
+
| Document
|
|
232
|
+
| Element
|
|
233
|
+
| null
|
|
234
|
+
| typeof globalThis
|
|
235
|
+
| ShadowRoot
|
|
236
|
+
| EventTarget
|
|
237
|
+
| ChildNode
|
|
238
|
+
| Node;
|
|
239
|
+
|
|
240
|
+
export type ParseHTMLReturnType<T1, T2> = T1 extends true ? (T2 extends true ? Document : HTMLElement) : HTMLElement;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* 事件的额外配置
|
|
244
|
+
*/
|
|
245
|
+
export declare type PopsDOMUtilsEventListenerOption = AddEventListenerOptions & {
|
|
246
|
+
/**
|
|
247
|
+
* 是否使用 event.composedPath() 来代替 event.target
|
|
248
|
+
*
|
|
249
|
+
* 一般用于设置了selector参数
|
|
250
|
+
*/
|
|
251
|
+
isComposedPath?: boolean;
|
|
252
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 动画
|
|
3
|
-
*/
|
|
4
|
-
export type PopsAnimation =
|
|
5
|
-
| "pops-anim-spread"
|
|
6
|
-
| "pops-anim-shake"
|
|
7
|
-
| "pops-anim-rolling-left"
|
|
8
|
-
| "pops-anim-rolling-right"
|
|
9
|
-
| "pops-anim-slide-top"
|
|
10
|
-
| "pops-anim-slide-bottom"
|
|
11
|
-
| "pops-anim-slide-left"
|
|
12
|
-
| "pops-anim-slide-right"
|
|
13
|
-
| "pops-anim-fadein"
|
|
14
|
-
| "pops-anim-fadein-zoom"
|
|
15
|
-
| "pops-anim-fadein-alert"
|
|
16
|
-
| "pops-anim-don"
|
|
17
|
-
| "pops-anim-roll"
|
|
18
|
-
| "pops-anim-sandra"
|
|
19
|
-
| "pops-anim-gather";
|
|
1
|
+
/**
|
|
2
|
+
* 动画
|
|
3
|
+
*/
|
|
4
|
+
export type PopsAnimation =
|
|
5
|
+
| "pops-anim-spread"
|
|
6
|
+
| "pops-anim-shake"
|
|
7
|
+
| "pops-anim-rolling-left"
|
|
8
|
+
| "pops-anim-rolling-right"
|
|
9
|
+
| "pops-anim-slide-top"
|
|
10
|
+
| "pops-anim-slide-bottom"
|
|
11
|
+
| "pops-anim-slide-left"
|
|
12
|
+
| "pops-anim-slide-right"
|
|
13
|
+
| "pops-anim-fadein"
|
|
14
|
+
| "pops-anim-fadein-zoom"
|
|
15
|
+
| "pops-anim-fadein-alert"
|
|
16
|
+
| "pops-anim-don"
|
|
17
|
+
| "pops-anim-roll"
|
|
18
|
+
| "pops-anim-sandra"
|
|
19
|
+
| "pops-anim-gather";
|