@whitesev/pops 1.0.0 → 1.0.1
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 +243 -0
- package/dist/index.amd.js +5634 -151
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +5634 -151
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5634 -151
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +5634 -151
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +5634 -151
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +5634 -151
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +119 -60
- package/dist/types/src/components/alert/index.d.ts +1 -1
- package/dist/types/src/components/alert/indexType.d.ts +16 -0
- package/dist/types/src/components/confirm/index.d.ts +1 -1
- package/dist/types/src/components/confirm/indexType.d.ts +6 -0
- package/dist/types/src/components/drawer/index.d.ts +2 -0
- package/dist/types/src/components/drawer/indexType.d.ts +43 -0
- package/dist/types/src/components/folder/folderIcon.d.ts +27 -0
- package/dist/types/src/components/folder/index.d.ts +2 -0
- package/dist/types/src/components/folder/indexType.d.ts +68 -0
- package/dist/types/src/components/iframe/index.d.ts +2 -0
- package/dist/types/src/components/iframe/indexType.d.ts +120 -0
- package/dist/types/src/components/loading/index.d.ts +2 -0
- package/dist/types/src/components/loading/indexType.d.ts +23 -0
- package/dist/types/src/components/panel/buttonType.d.ts +60 -0
- package/dist/types/src/components/panel/commonType.d.ts +46 -0
- package/dist/types/src/components/panel/deepMenuType.d.ts +56 -0
- package/dist/types/src/components/panel/formsType.d.ts +31 -0
- package/dist/types/src/components/panel/index.d.ts +2 -0
- package/dist/types/src/components/panel/indexType.d.ts +86 -0
- package/dist/types/src/components/panel/inputType.d.ts +61 -0
- package/dist/types/src/components/panel/ownType.d.ts +27 -0
- package/dist/types/src/components/panel/selectType.d.ts +71 -0
- package/dist/types/src/components/panel/sliderType.d.ts +58 -0
- package/dist/types/src/components/panel/switchType.d.ts +42 -0
- package/dist/types/src/components/panel/textareaType.d.ts +50 -0
- package/dist/types/src/components/prompt/index.d.ts +2 -0
- package/dist/types/src/components/prompt/indexType.d.ts +37 -0
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -0
- package/dist/types/src/components/rightClickMenu/indexType.d.ts +77 -0
- package/dist/types/src/components/searchSuggestion/index.d.ts +4 -0
- package/dist/types/src/components/searchSuggestion/indexType.d.ts +238 -0
- package/dist/types/src/components/tooltip/index.d.ts +2 -0
- package/dist/types/src/components/tooltip/indexType.d.ts +91 -0
- package/dist/types/src/handler/PopsHandler.d.ts +51 -39
- package/{src → dist/types/src}/types/PopsDOMUtilsEventType.d.ts +31 -33
- package/{src → dist/types/src}/types/animation.d.ts +1 -1
- package/{src → dist/types/src}/types/button.d.ts +21 -11
- package/{src → dist/types/src}/types/components.d.ts +9 -9
- package/{src → dist/types/src}/types/event.d.ts +6 -4
- package/{src → dist/types/src}/types/icon.d.ts +3 -1
- package/{src → dist/types/src}/types/layer.d.ts +2 -2
- package/{src → dist/types/src}/types/main.d.ts +22 -21
- package/{src → dist/types/src}/types/mask.d.ts +1 -1
- package/{src → dist/types/src}/types/position.d.ts +3 -3
- package/dist/types/src/utils/PopsDOMUtils.d.ts +1 -0
- package/dist/types/src/utils/PopsDOMUtilsEvent.d.ts +2 -0
- package/dist/types/src/utils/PopsUIUtils.d.ts +10 -9
- package/dist/types/src/utils/PopsUtils.d.ts +2 -2
- package/package.json +2 -3
- /package/{src → dist/types/src}/types/global.d.ts +0 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* config.data
|
|
3
|
+
*/
|
|
4
|
+
export interface PopsSearchSuggestionData<T = any> {
|
|
5
|
+
/**
|
|
6
|
+
* 存储的值
|
|
7
|
+
*/
|
|
8
|
+
value: T;
|
|
9
|
+
/**
|
|
10
|
+
* li元素的html
|
|
11
|
+
*/
|
|
12
|
+
text: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 搜索建议悬浮窗
|
|
16
|
+
* pops.searchSuggestion
|
|
17
|
+
*/
|
|
18
|
+
export interface PopsSearchSuggestionDetails<T = any> {
|
|
19
|
+
/**
|
|
20
|
+
* 当前的环境,可以是document,可以是shadowroot,默认是document
|
|
21
|
+
*/
|
|
22
|
+
selfDocument?: Document;
|
|
23
|
+
/**
|
|
24
|
+
* 目标元素,一般是跟随它的位置变化,监听它的focus/click
|
|
25
|
+
*/
|
|
26
|
+
target: HTMLElement;
|
|
27
|
+
/**
|
|
28
|
+
* 目标input元素,监听它的focus/click/input事件
|
|
29
|
+
*/
|
|
30
|
+
inputTarget?: HTMLInputElement;
|
|
31
|
+
/**
|
|
32
|
+
* 数据
|
|
33
|
+
*/
|
|
34
|
+
data: PopsSearchSuggestionData<T>[];
|
|
35
|
+
/**
|
|
36
|
+
* 右边的删除按钮图标
|
|
37
|
+
*/
|
|
38
|
+
deleteIcon?: {
|
|
39
|
+
/**
|
|
40
|
+
* 是否启用,默认true
|
|
41
|
+
*/
|
|
42
|
+
enable?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 点击回调
|
|
45
|
+
*/
|
|
46
|
+
callback?: (event: MouseEvent | PointerEvent, liElement: HTMLLIElement, data: PopsSearchSuggestionData<T>) => void;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 自定义的className
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
/**
|
|
53
|
+
* position是否使用absolut,默认true
|
|
54
|
+
*/
|
|
55
|
+
isAbsolute?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 是否启用动画,默认true
|
|
58
|
+
*/
|
|
59
|
+
isAnimation?: true;
|
|
60
|
+
/**
|
|
61
|
+
* 建议框的宽度,默认250px
|
|
62
|
+
*/
|
|
63
|
+
width?: string;
|
|
64
|
+
/**
|
|
65
|
+
* 是否和config.target的宽度同步,默认true
|
|
66
|
+
*/
|
|
67
|
+
followTargetWidth?: true;
|
|
68
|
+
/**
|
|
69
|
+
* 建议框的最大高度,默认300px
|
|
70
|
+
*/
|
|
71
|
+
maxHeight?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 建议框距离元素的距离,默认0
|
|
74
|
+
*/
|
|
75
|
+
topDistance?: number;
|
|
76
|
+
/**
|
|
77
|
+
* 建议框显示的位置,默认是auto(自动判断位置)
|
|
78
|
+
*/
|
|
79
|
+
position?: "top" | "bottom" | "auto";
|
|
80
|
+
/**
|
|
81
|
+
* 当位置在上面时(包括auto自动判断在上面时),是否对搜索项进行反转,默认true
|
|
82
|
+
*/
|
|
83
|
+
positionTopToReverse?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 层级,默认10000
|
|
86
|
+
*/
|
|
87
|
+
zIndex?: 10000;
|
|
88
|
+
/**
|
|
89
|
+
* 搜索中的提示
|
|
90
|
+
*/
|
|
91
|
+
searchingTip?: string;
|
|
92
|
+
/**
|
|
93
|
+
* 没有搜索结果的提示的html
|
|
94
|
+
*/
|
|
95
|
+
toSearhNotResultHTML?: string;
|
|
96
|
+
/**
|
|
97
|
+
* 没有搜索结果是否隐藏提示框,默认false
|
|
98
|
+
*/
|
|
99
|
+
toHideWithNotResult?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* 跟随目标的位置,默认为target的位置
|
|
102
|
+
*/
|
|
103
|
+
followPosition?: "target" | "input" | "inputCursor";
|
|
104
|
+
/**
|
|
105
|
+
* 获取每一项的html
|
|
106
|
+
*/
|
|
107
|
+
getItemHTML: (item: PopsSearchSuggestionData<T>) => string;
|
|
108
|
+
/**
|
|
109
|
+
* 当config.target触发input时自动调用该函数来获取数据
|
|
110
|
+
* @param value 当前输入框的值
|
|
111
|
+
*/
|
|
112
|
+
getData: (value: string) => Promise<any[]>;
|
|
113
|
+
/**
|
|
114
|
+
* 每一项的点击回调
|
|
115
|
+
* @param event 触发的事件
|
|
116
|
+
* @param liElement 每一项的元素
|
|
117
|
+
* @param data config.data的数据
|
|
118
|
+
*/
|
|
119
|
+
itemClickCallBack?: (event: MouseEvent | PointerEvent, liElement: HTMLLIElement, data: PopsSearchSuggestionData<T>) => void;
|
|
120
|
+
/**
|
|
121
|
+
* 键盘的上下键选择的回调
|
|
122
|
+
* @param event 触发的事件
|
|
123
|
+
* @param liElement 每一项的元素
|
|
124
|
+
* @param data config.data的数据
|
|
125
|
+
*/
|
|
126
|
+
selectCallBack?: (event: MouseEvent, liElement: HTMLLIElement, data: PopsSearchSuggestionData<T>) => void;
|
|
127
|
+
/**
|
|
128
|
+
* (可选)自定义style
|
|
129
|
+
*/
|
|
130
|
+
style?: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* pops.searchSuggestion的函数返回值
|
|
134
|
+
*/
|
|
135
|
+
export interface PopsSearchSuggestionResult<T = any> {
|
|
136
|
+
/**
|
|
137
|
+
* 根元素
|
|
138
|
+
*/
|
|
139
|
+
root: HTMLElement;
|
|
140
|
+
/**
|
|
141
|
+
* ul元素
|
|
142
|
+
*/
|
|
143
|
+
hintULElement: HTMLUListElement;
|
|
144
|
+
/**
|
|
145
|
+
* 初始化
|
|
146
|
+
*/
|
|
147
|
+
init: () => void;
|
|
148
|
+
/**
|
|
149
|
+
* 获取显示出搜索建议框的html
|
|
150
|
+
*/
|
|
151
|
+
getSearchSelectElement: () => HTMLElement;
|
|
152
|
+
/**
|
|
153
|
+
* 获取显示出搜索建议框的每一项的html
|
|
154
|
+
*/
|
|
155
|
+
getSearchItemLiElement: (data: PopsSearchSuggestionData<T>, index: number) => HTMLElement;
|
|
156
|
+
/**
|
|
157
|
+
* 获取data-value值
|
|
158
|
+
*/
|
|
159
|
+
getItemDataValue: (data: PopsSearchSuggestionData<T>) => PopsSearchSuggestionData<T>;
|
|
160
|
+
/**
|
|
161
|
+
* 设置搜索建议框每一项的点击事件
|
|
162
|
+
*/
|
|
163
|
+
setSearchItemClickEvent: (liElement: HTMLLIElement) => void;
|
|
164
|
+
/**
|
|
165
|
+
* 监听输入框内容改变
|
|
166
|
+
*/
|
|
167
|
+
setInputChangeEvent: () => void;
|
|
168
|
+
/**
|
|
169
|
+
* 移除输入框内容改变的监听
|
|
170
|
+
*/
|
|
171
|
+
removeInputChangeEvent: () => void;
|
|
172
|
+
/**
|
|
173
|
+
* 设置显示搜索建议框的事件
|
|
174
|
+
*/
|
|
175
|
+
setShowEvent: () => void;
|
|
176
|
+
/**
|
|
177
|
+
* 移除显示搜索建议框的事件
|
|
178
|
+
*/
|
|
179
|
+
removeShowEvent: () => void;
|
|
180
|
+
/**
|
|
181
|
+
* 设置隐藏搜索建议框的事件
|
|
182
|
+
*/
|
|
183
|
+
setHideEvent: () => void;
|
|
184
|
+
/**
|
|
185
|
+
* 移除隐藏搜索建议框的事件
|
|
186
|
+
*/
|
|
187
|
+
removeHideEvent: () => void;
|
|
188
|
+
/**
|
|
189
|
+
* 设置所有监听
|
|
190
|
+
*/
|
|
191
|
+
setAllEvent: () => void;
|
|
192
|
+
/**
|
|
193
|
+
* 移除所有监听
|
|
194
|
+
*/
|
|
195
|
+
removeAllEvent: () => void;
|
|
196
|
+
/**
|
|
197
|
+
* 获取删除按钮的html
|
|
198
|
+
*/
|
|
199
|
+
getDeleteIconHTML: (size: number, fill: string) => void;
|
|
200
|
+
/**
|
|
201
|
+
* 设置当前正在搜索中的提示
|
|
202
|
+
*/
|
|
203
|
+
setPromptsInSearch: () => void;
|
|
204
|
+
/**
|
|
205
|
+
* 移除正在搜索中的提示
|
|
206
|
+
*/
|
|
207
|
+
removePromptsInSearch: () => void;
|
|
208
|
+
/**
|
|
209
|
+
* 清空所有的搜索结果
|
|
210
|
+
*/
|
|
211
|
+
clearAllSearchItemLi: () => void;
|
|
212
|
+
/**
|
|
213
|
+
* 修改搜索建议框的位置(top、left)
|
|
214
|
+
* 因为目标元素可能是动态隐藏的
|
|
215
|
+
*/
|
|
216
|
+
changeHintULElementPosition: () => void;
|
|
217
|
+
/**
|
|
218
|
+
* 修改搜索建议框的width
|
|
219
|
+
* 因为目标元素可能是动态隐藏的
|
|
220
|
+
*/
|
|
221
|
+
changeHintULElementWidth: () => void;
|
|
222
|
+
/**
|
|
223
|
+
* 更新页面显示的搜索结果
|
|
224
|
+
*/
|
|
225
|
+
update: (data: PopsSearchSuggestionData<T>) => void;
|
|
226
|
+
/**
|
|
227
|
+
* 清空当前的搜索结果并显示无结果
|
|
228
|
+
*/
|
|
229
|
+
clear: () => void;
|
|
230
|
+
/**
|
|
231
|
+
* 隐藏搜索建议框
|
|
232
|
+
*/
|
|
233
|
+
hide: () => void;
|
|
234
|
+
/**
|
|
235
|
+
* 显示搜索建议框
|
|
236
|
+
*/
|
|
237
|
+
show: () => void;
|
|
238
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/** tooltip的出现位置 */
|
|
2
|
+
export type PopsTooltipPosition = "top" | "right" | "bottom" | "left";
|
|
3
|
+
/**
|
|
4
|
+
* pops.tooltip
|
|
5
|
+
*/
|
|
6
|
+
export interface PopsToolTipDetails {
|
|
7
|
+
/**
|
|
8
|
+
* 目标元素
|
|
9
|
+
*/
|
|
10
|
+
target: HTMLElement;
|
|
11
|
+
/**
|
|
12
|
+
* 显示的文字
|
|
13
|
+
*/
|
|
14
|
+
content: string | (() => string);
|
|
15
|
+
/**
|
|
16
|
+
* 位置,默认top
|
|
17
|
+
*/
|
|
18
|
+
position?: PopsTooltipPosition;
|
|
19
|
+
/**
|
|
20
|
+
* 自定义className,默认为空
|
|
21
|
+
* + github-tooltip
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 是否总是显示,默认为false
|
|
26
|
+
* + true 设置的triggerShowEventName、triggerCloseEventName将无效
|
|
27
|
+
* 返回提供show和close函数,取消on和off
|
|
28
|
+
* + false 返回提供on和off,取消close函数
|
|
29
|
+
*/
|
|
30
|
+
alwaysShow?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 触发显示事件的名称,默认mouseenter touchstart,如果是多个事件,按空格分割
|
|
33
|
+
*/
|
|
34
|
+
triggerShowEventName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 触发关闭事件的名称,默认mouseleave touchend,如果是多个事件,按空格分割
|
|
37
|
+
*/
|
|
38
|
+
triggerCloseEventName?: string;
|
|
39
|
+
/**
|
|
40
|
+
* z-index,默认10000
|
|
41
|
+
*/
|
|
42
|
+
zIndex?: number;
|
|
43
|
+
/**
|
|
44
|
+
* 是否唯一,默认false
|
|
45
|
+
*/
|
|
46
|
+
only?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 监听的事件配置
|
|
49
|
+
*/
|
|
50
|
+
eventOption?: AddEventListenerOptions;
|
|
51
|
+
/**
|
|
52
|
+
* 触发显示前的回调
|
|
53
|
+
* 返回值为false可阻止显示
|
|
54
|
+
*/
|
|
55
|
+
showBeforeCallBack?: () => boolean | void;
|
|
56
|
+
/**
|
|
57
|
+
* 触发显示后的回调
|
|
58
|
+
*/
|
|
59
|
+
showAfterCallBack?: (toolTipElement: HTMLElement) => void;
|
|
60
|
+
/**
|
|
61
|
+
* 触发关闭前的回调
|
|
62
|
+
* 返回值为false可阻止关闭
|
|
63
|
+
*/
|
|
64
|
+
closeBeforeCallBack?: (toolTipElement: HTMLElement) => boolean | void;
|
|
65
|
+
/**
|
|
66
|
+
* 触发关闭后的回调
|
|
67
|
+
*/
|
|
68
|
+
closeAfterCallBack?: (toolTipElement: HTMLElement) => void;
|
|
69
|
+
/**
|
|
70
|
+
* 箭头与目标的的距离,默认12.5(px)
|
|
71
|
+
*/
|
|
72
|
+
arrowDistance?: number;
|
|
73
|
+
/**
|
|
74
|
+
* 其它的距离,默认0(px)
|
|
75
|
+
* + 当position为left或者right,这个距离是上、下距离
|
|
76
|
+
* + 当position为top或者bottom,这个距离是左、右距离
|
|
77
|
+
*/
|
|
78
|
+
otherDistance?: number;
|
|
79
|
+
/**
|
|
80
|
+
* (可选)自定义style
|
|
81
|
+
*/
|
|
82
|
+
style?: string;
|
|
83
|
+
/**
|
|
84
|
+
* 在元素添加到页面前的事件
|
|
85
|
+
*
|
|
86
|
+
* 当tooltip添加到ShadowRoot内时也会触发
|
|
87
|
+
* @param $shadowRoot 根元素
|
|
88
|
+
* @param $shadowContainer 容器
|
|
89
|
+
*/
|
|
90
|
+
beforeAppendToPageCallBack?: ($shadowRoot: ShadowRoot, $shadowContainer: HTMLDivElement) => void;
|
|
91
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { PopsAlertDetails } from "../components/alert/
|
|
2
|
-
import type { PopsConfirmDetails } from "../components/confirm/
|
|
3
|
-
import type { PopsDrawerDetails } from "../components/drawer/
|
|
4
|
-
import type { PopsFolderDetails } from "../components/folder/
|
|
5
|
-
import type { PopsIframeDetails } from "../components/iframe/
|
|
6
|
-
import type { PopsLoadingDetails } from "../components/loading/
|
|
7
|
-
import type { PopsPanelDetails } from "../components/panel/
|
|
8
|
-
import type { PopsPromptDetails } from "../components/prompt/
|
|
1
|
+
import type { PopsAlertDetails } from "../components/alert/indexType";
|
|
2
|
+
import type { PopsConfirmDetails } from "../components/confirm/indexType";
|
|
3
|
+
import type { PopsDrawerDetails } from "../components/drawer/indexType";
|
|
4
|
+
import type { PopsFolderDetails } from "../components/folder/indexType";
|
|
5
|
+
import type { PopsIframeDetails } from "../components/iframe/indexType";
|
|
6
|
+
import type { PopsLoadingDetails } from "../components/loading/indexType";
|
|
7
|
+
import type { PopsPanelDetails } from "../components/panel/indexType";
|
|
8
|
+
import type { PopsPromptDetails } from "../components/prompt/indexType";
|
|
9
|
+
import { PopsEventDetails, PopsHandlerEventDetails } from "../types/event";
|
|
10
|
+
import { PopsLayerCommonConfig } from "../types/layer";
|
|
9
11
|
import type { PopsLayerMode, PopsMode, PopsType } from "../types/main";
|
|
10
12
|
export declare const PopsHandler: {
|
|
11
13
|
/**
|
|
@@ -20,7 +22,7 @@ export declare const PopsHandler: {
|
|
|
20
22
|
* @param $shadowRoot 所在的shadowRoot
|
|
21
23
|
* @param cssText 添加进ShadowRoot的CSS
|
|
22
24
|
*/
|
|
23
|
-
handleInit($shadowRoot
|
|
25
|
+
handleInit($shadowRoot?: ShadowRoot, cssText?: string | string[]): void;
|
|
24
26
|
/**
|
|
25
27
|
* 处理遮罩层
|
|
26
28
|
* @param details 传递的配置
|
|
@@ -28,7 +30,7 @@ export declare const PopsHandler: {
|
|
|
28
30
|
handleMask(details?: {
|
|
29
31
|
type: "alert" | "confirm" | "prompt" | "loading" | "iframe" | "drawer" | "folder" | "panel";
|
|
30
32
|
guid: string;
|
|
31
|
-
config: Required<PopsAlertDetails>;
|
|
33
|
+
config: Required<PopsAlertDetails> | Required<PopsLoadingDetails> | Required<PopsIframeDetails> | Required<PopsDrawerDetails> | Required<PopsPanelDetails> | Required<PopsFolderDetails>;
|
|
32
34
|
animElement: HTMLElement;
|
|
33
35
|
maskHTML: string;
|
|
34
36
|
}): {
|
|
@@ -43,103 +45,103 @@ export declare const PopsHandler: {
|
|
|
43
45
|
/**
|
|
44
46
|
* 主元素
|
|
45
47
|
*/
|
|
46
|
-
popsElement: HTMLDivElement
|
|
48
|
+
popsElement: HTMLDivElement;
|
|
47
49
|
/**
|
|
48
50
|
* 确认按钮
|
|
49
51
|
*/
|
|
50
|
-
btnOkElement: HTMLDivElement
|
|
52
|
+
btnOkElement: HTMLDivElement;
|
|
51
53
|
/**
|
|
52
54
|
* 取消按钮
|
|
53
55
|
*/
|
|
54
|
-
btnCancelElement: HTMLDivElement
|
|
56
|
+
btnCancelElement: HTMLDivElement;
|
|
55
57
|
/**
|
|
56
58
|
* 其它按钮
|
|
57
59
|
*/
|
|
58
|
-
btnOtherElement: HTMLDivElement
|
|
60
|
+
btnOtherElement: HTMLDivElement;
|
|
59
61
|
/**
|
|
60
62
|
* 标题元素
|
|
61
63
|
*/
|
|
62
|
-
titleElement: HTMLDivElement
|
|
64
|
+
titleElement: HTMLDivElement;
|
|
63
65
|
/**
|
|
64
66
|
* 输入框元素
|
|
65
67
|
*/
|
|
66
|
-
inputElement: HTMLInputElement | HTMLTextAreaElement
|
|
68
|
+
inputElement: HTMLInputElement | HTMLTextAreaElement;
|
|
67
69
|
/**
|
|
68
70
|
* 顶部按钮控制层元素
|
|
69
71
|
*/
|
|
70
|
-
headerControlsElement: HTMLDivElement
|
|
72
|
+
headerControlsElement: HTMLDivElement;
|
|
71
73
|
/**
|
|
72
74
|
* iframe元素
|
|
73
75
|
*/
|
|
74
|
-
iframeElement: HTMLIFrameElement
|
|
76
|
+
iframeElement: HTMLIFrameElement;
|
|
75
77
|
/**
|
|
76
78
|
* 加载中元素
|
|
77
79
|
*/
|
|
78
|
-
loadingElement: HTMLDivElement
|
|
80
|
+
loadingElement: HTMLDivElement;
|
|
79
81
|
/**
|
|
80
82
|
* 内容元素
|
|
81
83
|
*/
|
|
82
|
-
contentElement: HTMLDivElement
|
|
84
|
+
contentElement: HTMLDivElement;
|
|
83
85
|
/**
|
|
84
86
|
* 内容侧边栏容器元素
|
|
85
87
|
*/
|
|
86
|
-
contentAsideElement: HTMLDivElement
|
|
88
|
+
contentAsideElement: HTMLDivElement;
|
|
87
89
|
/**
|
|
88
90
|
* 内容主要区域容器元素
|
|
89
91
|
*/
|
|
90
|
-
contentSectionContainerElement: HTMLDivElement
|
|
92
|
+
contentSectionContainerElement: HTMLDivElement;
|
|
91
93
|
/**
|
|
92
94
|
* 内容加载中元素
|
|
93
95
|
*/
|
|
94
|
-
contentLoadingElement: HTMLDivElement
|
|
96
|
+
contentLoadingElement: HTMLDivElement;
|
|
95
97
|
/**
|
|
96
98
|
* 顶部缩小按钮
|
|
97
99
|
*/
|
|
98
|
-
headerMinBtnElement: HTMLDivElement
|
|
100
|
+
headerMinBtnElement: HTMLDivElement;
|
|
99
101
|
/**
|
|
100
102
|
* 顶部放大按钮
|
|
101
103
|
*/
|
|
102
|
-
headerMaxBtnElement: HTMLDivElement
|
|
104
|
+
headerMaxBtnElement: HTMLDivElement;
|
|
103
105
|
/**
|
|
104
106
|
* 顶部恢复原样按钮
|
|
105
107
|
*/
|
|
106
|
-
headerMiseBtnElement: HTMLDivElement
|
|
108
|
+
headerMiseBtnElement: HTMLDivElement;
|
|
107
109
|
/**
|
|
108
110
|
* 顶部关闭按钮
|
|
109
111
|
*/
|
|
110
|
-
headerCloseBtnElement: HTMLDivElement
|
|
112
|
+
headerCloseBtnElement: HTMLDivElement;
|
|
111
113
|
/**
|
|
112
114
|
* 文件夹列表元素
|
|
113
115
|
*/
|
|
114
|
-
folderListElement: HTMLDivElement
|
|
116
|
+
folderListElement: HTMLDivElement;
|
|
115
117
|
/**
|
|
116
118
|
* 文件夹列表顶部元素
|
|
117
119
|
*/
|
|
118
|
-
folderListHeaderElement: HTMLDivElement
|
|
120
|
+
folderListHeaderElement: HTMLDivElement;
|
|
119
121
|
/**
|
|
120
122
|
* 文件夹列表行元素
|
|
121
123
|
*/
|
|
122
|
-
folderListHeaderRowElement: HTMLTableRowElement
|
|
124
|
+
folderListHeaderRowElement: HTMLTableRowElement;
|
|
123
125
|
/**
|
|
124
126
|
* 文件夹列表tbody元素
|
|
125
127
|
*/
|
|
126
|
-
folderListBodyElement: HTMLTableElement
|
|
128
|
+
folderListBodyElement: HTMLTableElement;
|
|
127
129
|
/**
|
|
128
130
|
* 文件夹列表primary元素
|
|
129
131
|
*/
|
|
130
|
-
folderFileListBreadcrumbPrimaryElement: HTMLDivElement
|
|
132
|
+
folderFileListBreadcrumbPrimaryElement: HTMLDivElement;
|
|
131
133
|
/**
|
|
132
134
|
* 文件夹排序按钮-文件名
|
|
133
135
|
*/
|
|
134
|
-
folderListSortFileNameElement: HTMLDivElement
|
|
136
|
+
folderListSortFileNameElement: HTMLDivElement;
|
|
135
137
|
/**
|
|
136
138
|
* 文件夹排序按钮-修改时间
|
|
137
139
|
*/
|
|
138
|
-
folderListSortLatestTimeElement: HTMLDivElement
|
|
140
|
+
folderListSortLatestTimeElement: HTMLDivElement;
|
|
139
141
|
/**
|
|
140
142
|
* 文件夹排序按钮-文件大小
|
|
141
143
|
*/
|
|
142
|
-
folderListSortFileSizeElement: HTMLDivElement
|
|
144
|
+
folderListSortFileSizeElement: HTMLDivElement;
|
|
143
145
|
};
|
|
144
146
|
/**
|
|
145
147
|
* 获取事件配置
|
|
@@ -153,6 +155,16 @@ export declare const PopsHandler: {
|
|
|
153
155
|
* @param config 当前配置
|
|
154
156
|
*/
|
|
155
157
|
handleEventDetails(guid: string, $shadowContainer: HTMLDivElement, $shadowRoot: ShadowRoot, mode: PopsLayerMode, animElement: HTMLDivElement, popsElement: HTMLDivElement, maskElement: HTMLDivElement, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails): PopsEventDetails;
|
|
158
|
+
/**
|
|
159
|
+
* 获取loading的事件配置
|
|
160
|
+
* @param guid
|
|
161
|
+
* @param mode 当前弹窗类型
|
|
162
|
+
* @param animElement 动画层
|
|
163
|
+
* @param popsElement 主元素
|
|
164
|
+
* @param maskElement 遮罩层
|
|
165
|
+
* @param config 当前配置
|
|
166
|
+
*/
|
|
167
|
+
handleLoadingEventDetails(guid: string, mode: "loading", animElement: HTMLDivElement, popsElement: HTMLDivElement, maskElement: HTMLDivElement, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails): Omit<PopsEventDetails, "$shadowContainer" | "$shadowRoot">;
|
|
156
168
|
/**
|
|
157
169
|
* 处理返回的配置,针对popsHandler.handleEventDetails
|
|
158
170
|
*/
|
|
@@ -185,16 +197,16 @@ export declare const PopsHandler: {
|
|
|
185
197
|
};
|
|
186
198
|
/**
|
|
187
199
|
* 处理prompt的点击事件
|
|
200
|
+
* @param type 触发事件类型
|
|
188
201
|
* @param inputElement 输入框
|
|
189
202
|
* @param $btn 按钮元素
|
|
190
|
-
* @param
|
|
191
|
-
* @param event 事件配置,由popsHandler.handleEventDetails创建的
|
|
203
|
+
* @param eventDetails 事件配置,由popsHandler.handleEventDetails创建的
|
|
192
204
|
* @param callback 点击回调
|
|
193
205
|
*/
|
|
194
|
-
handlePromptClickEvent(
|
|
206
|
+
handlePromptClickEvent(type: "ok" | "close" | "cancel" | "other", inputElement: HTMLInputElement | HTMLTextAreaElement, $btn: HTMLElement, eventDetails: PopsEventDetails, callback: (details: PopsEventDetails & {
|
|
195
207
|
type: any;
|
|
196
208
|
text: string;
|
|
197
|
-
}) => void): void;
|
|
209
|
+
}, event: MouseEvent | PointerEvent) => void): void;
|
|
198
210
|
/**
|
|
199
211
|
* 处理config.only
|
|
200
212
|
* @param type 当前弹窗类型
|