@whitesev/pops 3.2.1 → 3.3.0
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 +249 -249
- package/dist/index.amd.js +736 -948
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +736 -948
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +736 -948
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +736 -948
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +736 -948
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +736 -948
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/PopsCore.d.ts +15 -7
- package/dist/types/src/components/folder/types/index.d.ts +43 -13
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +313 -313
- package/dist/types/src/types/animation.d.ts +19 -19
- package/dist/types/src/types/button.d.ts +94 -94
- package/dist/types/src/types/components.d.ts +211 -211
- package/dist/types/src/types/event.d.ts +43 -43
- package/dist/types/src/types/global.d.ts +31 -31
- package/dist/types/src/types/icon.d.ts +32 -32
- package/dist/types/src/types/inst.d.ts +28 -28
- package/dist/types/src/types/main.d.ts +66 -66
- package/dist/types/src/types/mask.d.ts +52 -52
- package/dist/types/src/types/position.d.ts +60 -60
- package/package.json +28 -27
- package/src/Pops.ts +206 -206
- package/src/PopsAnimation.ts +32 -32
- package/src/PopsCSS.ts +54 -54
- package/src/PopsCore.ts +53 -37
- package/src/PopsIcon.ts +95 -95
- package/src/PopsInst.ts +21 -21
- package/src/components/alert/defaultConfig.ts +62 -62
- package/src/components/alert/index.ts +163 -163
- package/src/components/alert/types/index.ts +23 -23
- package/src/components/confirm/defaultConfig.ts +90 -90
- package/src/components/confirm/index.ts +165 -165
- package/src/components/confirm/types/index.ts +13 -17
- package/src/components/drawer/defaultConfig.ts +89 -89
- package/src/components/drawer/index.css +37 -37
- package/src/components/drawer/index.ts +245 -245
- package/src/components/drawer/types/index.ts +62 -61
- package/src/components/folder/defaultConfig.ts +151 -151
- package/src/components/folder/folderIcon.ts +28 -28
- package/src/components/folder/index.css +303 -303
- package/src/components/folder/index.ts +953 -932
- package/src/components/folder/types/index.ts +143 -110
- package/src/components/iframe/defaultConfig.ts +60 -60
- package/src/components/iframe/index.css +76 -76
- package/src/components/iframe/index.ts +331 -331
- package/src/components/iframe/types/index.ts +96 -96
- package/src/components/loading/defaultConfig.ts +29 -29
- package/src/components/loading/index.css +66 -66
- package/src/components/loading/index.ts +101 -101
- package/src/components/loading/types/index.ts +36 -34
- package/src/components/panel/css/components-select.css +84 -84
- package/src/components/panel/defaultConfig.ts +868 -868
- package/src/components/panel/handlerComponents.ts +3993 -3993
- package/src/components/panel/index.css +1403 -1403
- package/src/components/panel/index.ts +221 -221
- package/src/components/panel/types/components-button.ts +56 -56
- package/src/components/panel/types/components-common.ts +73 -73
- package/src/components/panel/types/components-container.ts +25 -25
- package/src/components/panel/types/components-deepMenu.ts +64 -64
- package/src/components/panel/types/components-input.ts +90 -90
- package/src/components/panel/types/components-own.ts +16 -16
- package/src/components/panel/types/components-select.ts +169 -169
- package/src/components/panel/types/components-selectMultiple.ts +105 -104
- package/src/components/panel/types/components-slider.ts +55 -55
- package/src/components/panel/types/components-switch.ts +33 -33
- package/src/components/panel/types/components-textarea.ts +45 -45
- package/src/components/panel/types/index.ts +244 -244
- package/src/components/prompt/defaultConfig.ts +94 -94
- package/src/components/prompt/index.css +34 -34
- package/src/components/prompt/index.ts +187 -215
- package/src/components/prompt/types/index.ts +57 -56
- package/src/components/rightClickMenu/defaultConfig.ts +103 -103
- package/src/components/rightClickMenu/index.css +115 -115
- package/src/components/rightClickMenu/index.ts +662 -662
- package/src/components/rightClickMenu/types/index.ts +145 -143
- package/src/components/searchSuggestion/defaultConfig.ts +63 -63
- package/src/components/searchSuggestion/index.ts +813 -813
- package/src/components/searchSuggestion/types/index.ts +244 -242
- package/src/components/tooltip/defaultConfig.ts +33 -33
- package/src/components/tooltip/index.css +199 -199
- package/src/components/tooltip/index.ts +617 -617
- package/src/components/tooltip/types/index.ts +123 -121
- package/src/config/CommonCSSClassName.ts +17 -17
- package/src/config/GlobalConfig.ts +63 -63
- package/src/css/animation.css +987 -987
- package/src/css/button.css +551 -551
- package/src/css/common.css +54 -54
- package/src/css/index.css +253 -253
- package/src/css/ninePalaceGridPosition.css +50 -50
- package/src/css/scrollbar.css +22 -22
- package/src/handler/PopsElementHandler.ts +303 -303
- package/src/handler/PopsHandler.ts +611 -611
- package/src/types/PopsDOMUtilsEventType.d.ts +313 -313
- package/src/types/animation.d.ts +19 -19
- package/src/types/button.d.ts +94 -94
- package/src/types/components.d.ts +211 -211
- package/src/types/event.d.ts +43 -43
- package/src/types/global.d.ts +31 -31
- package/src/types/icon.d.ts +32 -32
- package/src/types/inst.d.ts +28 -28
- package/src/types/main.d.ts +66 -66
- package/src/types/mask.d.ts +52 -52
- package/src/types/position.d.ts +60 -60
- package/src/utils/PopsDOMUtils.ts +2483 -2483
- package/src/utils/PopsDOMUtilsEventsConfig.ts +4 -4
- package/src/utils/PopsInstanceUtils.ts +714 -714
- package/src/utils/PopsMathUtils.ts +71 -71
- package/src/utils/PopsSafeUtils.ts +22 -22
- package/src/utils/PopsUtils.ts +391 -421
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const OriginPrototype: {
|
|
2
|
+
Object: {
|
|
3
|
+
defineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
declare const PopsCoreDefaultApi: {
|
|
2
7
|
document: Document;
|
|
3
8
|
window: Window & typeof globalThis;
|
|
4
9
|
globalThis: typeof globalThis;
|
|
5
10
|
self: Window & typeof globalThis;
|
|
11
|
+
setTimeout: typeof setTimeout;
|
|
12
|
+
setInterval: typeof setInterval;
|
|
13
|
+
clearTimeout: typeof clearTimeout;
|
|
14
|
+
clearInterval: typeof clearInterval;
|
|
6
15
|
};
|
|
7
16
|
declare const PopsCore: {
|
|
8
|
-
init(option?: typeof
|
|
17
|
+
init(option?: typeof PopsCoreDefaultApi): void;
|
|
9
18
|
readonly document: Document;
|
|
10
19
|
readonly window: Window & typeof globalThis;
|
|
11
20
|
readonly globalThis: typeof globalThis;
|
|
12
21
|
readonly self: Window & typeof globalThis;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
22
|
+
readonly setTimeout: typeof setTimeout;
|
|
23
|
+
readonly setInterval: typeof setInterval;
|
|
24
|
+
readonly clearTimeout: typeof clearTimeout;
|
|
25
|
+
readonly clearInterval: typeof clearInterval;
|
|
18
26
|
};
|
|
19
27
|
export { PopsCore, OriginPrototype };
|
|
@@ -4,10 +4,10 @@ import type { PopsTitleConfig, PopsDragConfig, PopsGeneralConfig, PopsMoreButton
|
|
|
4
4
|
*/
|
|
5
5
|
export type PopsFolderDownloadOption = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* 是否点击后自动触发下载
|
|
8
8
|
*
|
|
9
|
-
* + true
|
|
10
|
-
* + false
|
|
9
|
+
* + `true`: 自动根据设置的`mode`值来选择下载方式
|
|
10
|
+
* + `false`: 不触发下载
|
|
11
11
|
*/
|
|
12
12
|
autoDownload: boolean;
|
|
13
13
|
/**
|
|
@@ -17,11 +17,11 @@ export type PopsFolderDownloadOption = {
|
|
|
17
17
|
/**
|
|
18
18
|
* 下载方式
|
|
19
19
|
*
|
|
20
|
-
* + a
|
|
21
|
-
* + aBlank
|
|
22
|
-
* + iframe
|
|
23
|
-
* + open
|
|
24
|
-
* + openBlank
|
|
20
|
+
* + `a`: 使用`a标签`进行下载
|
|
21
|
+
* + `aBlank`: 使用`a标签`进行下载(添加属性`target="_blank"`)
|
|
22
|
+
* + `iframe`: 使用`iframe`进行下载
|
|
23
|
+
* + `open`: 使用`window.open`进行下载
|
|
24
|
+
* + `openBlank`: 使用`window.open`进行下载(添加参数`_blank`)
|
|
25
25
|
*
|
|
26
26
|
* @default "aBlank"
|
|
27
27
|
*/
|
|
@@ -36,23 +36,49 @@ export interface PopsFolderDataConfig {
|
|
|
36
36
|
*/
|
|
37
37
|
fileName: string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* 文件大小,如果是文件夹的话,请设置为`0`
|
|
40
40
|
*/
|
|
41
41
|
fileSize: number | string;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* 文件类型,如果是文件夹,填入`""`即可
|
|
44
|
+
*
|
|
45
|
+
* 填入后会根据文件类型,自动设置图标
|
|
44
46
|
*/
|
|
45
47
|
fileType: string;
|
|
48
|
+
/**
|
|
49
|
+
* 文件图标
|
|
50
|
+
* @default undefined
|
|
51
|
+
*/
|
|
52
|
+
fileIcon?: string;
|
|
46
53
|
/**
|
|
47
54
|
* 创建时间
|
|
48
55
|
*/
|
|
49
|
-
createTime: number
|
|
56
|
+
createTime: number | (() => {
|
|
57
|
+
/**
|
|
58
|
+
* 该值用于排序
|
|
59
|
+
*/
|
|
60
|
+
timeStamp: number;
|
|
61
|
+
/**
|
|
62
|
+
* 用于显示的文本
|
|
63
|
+
*/
|
|
64
|
+
showText: string;
|
|
65
|
+
});
|
|
50
66
|
/**
|
|
51
67
|
* 修改时间(最新时间)
|
|
52
68
|
*/
|
|
53
|
-
latestTime: number
|
|
69
|
+
latestTime: number | (() => {
|
|
70
|
+
/**
|
|
71
|
+
* 该值用于排序
|
|
72
|
+
*/
|
|
73
|
+
timeStamp: number;
|
|
74
|
+
/**
|
|
75
|
+
* 用于显示的文本
|
|
76
|
+
*/
|
|
77
|
+
showText: string;
|
|
78
|
+
});
|
|
54
79
|
/**
|
|
55
80
|
* 是否是文件夹
|
|
81
|
+
* @default false
|
|
56
82
|
*/
|
|
57
83
|
isFolder: boolean;
|
|
58
84
|
/**
|
|
@@ -62,7 +88,11 @@ export interface PopsFolderDataConfig {
|
|
|
62
88
|
/**
|
|
63
89
|
* 点击事件
|
|
64
90
|
*/
|
|
65
|
-
clickEvent?: (event: MouseEvent | PointerEvent,
|
|
91
|
+
clickEvent?: (event: MouseEvent | PointerEvent,
|
|
92
|
+
/**
|
|
93
|
+
* 当前层级的文件|文件夹信息配置
|
|
94
|
+
*/
|
|
95
|
+
config: PopsFolderDataConfig) => IPromise<PopsFolderDownloadOption | PopsFolderDataConfig[] | null | undefined | void>;
|
|
66
96
|
}
|
|
67
97
|
/**
|
|
68
98
|
* pops.folder
|