@whitesev/pops 1.6.2 → 1.6.3

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.
Files changed (44) hide show
  1. package/dist/index.amd.js +891 -872
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +891 -872
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +891 -872
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +891 -872
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +891 -872
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +891 -872
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/components/alert/config.d.ts +1 -1
  14. package/dist/types/src/components/confirm/config.d.ts +1 -1
  15. package/dist/types/src/components/drawer/config.d.ts +1 -1
  16. package/dist/types/src/components/folder/config.d.ts +1 -1
  17. package/dist/types/src/components/iframe/config.d.ts +1 -1
  18. package/dist/types/src/components/loading/config.d.ts +1 -1
  19. package/dist/types/src/components/panel/config.d.ts +1 -1
  20. package/dist/types/src/components/prompt/config.d.ts +1 -1
  21. package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
  22. package/dist/types/src/components/tooltip/config.d.ts +1 -1
  23. package/package.json +1 -1
  24. package/src/components/alert/config.ts +54 -52
  25. package/src/components/alert/index.ts +1 -1
  26. package/src/components/confirm/config.ts +80 -78
  27. package/src/components/confirm/index.ts +1 -1
  28. package/src/components/drawer/config.ts +74 -72
  29. package/src/components/drawer/index.ts +1 -1
  30. package/src/components/folder/config.ts +119 -117
  31. package/src/components/folder/index.ts +1 -1
  32. package/src/components/iframe/config.ts +52 -50
  33. package/src/components/iframe/index.ts +1 -1
  34. package/src/components/loading/config.ts +23 -21
  35. package/src/components/loading/index.ts +1 -1
  36. package/src/components/panel/config.ts +320 -318
  37. package/src/components/panel/index.ts +2 -4
  38. package/src/components/prompt/config.ts +88 -86
  39. package/src/components/prompt/index.ts +1 -1
  40. package/src/components/rightClickMenu/config.ts +2 -4
  41. package/src/components/searchSuggestion/config.ts +56 -53
  42. package/src/components/searchSuggestion/index.ts +1 -1
  43. package/src/components/tooltip/config.ts +26 -24
  44. package/src/components/tooltip/index.ts +1 -1
@@ -1,130 +1,132 @@
1
1
  import type { PopsFolderDetails } from "./indexType";
2
2
 
3
- export const PopsFolderConfig: Required<PopsFolderDetails> = {
4
- title: {
5
- text: "pops.Folder",
6
- position: "center",
7
- html: false,
8
- style: "",
9
- },
10
- sort: {
11
- name: "latestTime",
12
- isDesc: false,
13
- // @ts-ignore
14
- callback() {},
15
- },
16
- folder: [
17
- {
18
- fileName: "测试文件夹",
19
- fileSize: 0,
20
- fileType: "",
21
- createTime: 0,
22
- latestTime: 0,
23
- isFolder: true,
24
- index: 0,
3
+ export const PopsFolderConfig = (): Required<PopsFolderDetails> => {
4
+ return {
5
+ title: {
6
+ text: "pops.Folder",
7
+ position: "center",
8
+ html: false,
9
+ style: "",
10
+ },
11
+ sort: {
12
+ name: "latestTime",
13
+ isDesc: false,
25
14
  // @ts-ignore
26
- clickEvent() {
27
- return [
28
- {
29
- fileName: "内部-测试文件.zip",
30
- fileSize: 1025000,
31
- fileType: "zip",
32
- createTime: 1702038410440,
33
- latestTime: 1702039602126,
34
- isFolder: false,
35
- index: 1,
36
- clickEvent() {
37
- console.log("下载文件:", this.fileName);
38
- return "https://update.greasyfork.org/scripts/456485/pops.js";
15
+ callback() {},
16
+ },
17
+ folder: [
18
+ {
19
+ fileName: "测试文件夹",
20
+ fileSize: 0,
21
+ fileType: "",
22
+ createTime: 0,
23
+ latestTime: 0,
24
+ isFolder: true,
25
+ index: 0,
26
+ // @ts-ignore
27
+ clickEvent() {
28
+ return [
29
+ {
30
+ fileName: "内部-测试文件.zip",
31
+ fileSize: 1025000,
32
+ fileType: "zip",
33
+ createTime: 1702038410440,
34
+ latestTime: 1702039602126,
35
+ isFolder: false,
36
+ index: 1,
37
+ clickEvent() {
38
+ console.log("下载文件:", this.fileName);
39
+ return "https://update.greasyfork.org/scripts/456485/pops.js";
40
+ },
39
41
  },
40
- },
41
- ];
42
+ ];
43
+ },
42
44
  },
43
- },
44
- {
45
- fileName: "测试文件.apk",
46
- fileSize: 30125682,
47
- fileType: "apk",
48
- createTime: 1702036410440,
49
- latestTime: 1702039410440,
50
- isFolder: false,
51
- index: 1,
52
- // @ts-ignore
53
- clickEvent() {
54
- console.log("下载文件:", this.fileName);
55
- return "https://update.greasyfork.org/scripts/456485/pops.js";
45
+ {
46
+ fileName: "测试文件.apk",
47
+ fileSize: 30125682,
48
+ fileType: "apk",
49
+ createTime: 1702036410440,
50
+ latestTime: 1702039410440,
51
+ isFolder: false,
52
+ index: 1,
53
+ // @ts-ignore
54
+ clickEvent() {
55
+ console.log("下载文件:", this.fileName);
56
+ return "https://update.greasyfork.org/scripts/456485/pops.js";
57
+ },
56
58
  },
57
- },
58
- ],
59
- btn: {
60
- merge: false,
61
- mergeReverse: false,
62
- reverse: false,
63
- position: "flex-end",
64
- ok: {
65
- enable: true,
66
- size: void 0,
67
- icon: void 0,
68
- rightIcon: false,
69
- iconIsLoading: false,
70
- text: "确定",
71
- type: "primary",
72
- callback(event) {
73
- event.close();
59
+ ],
60
+ btn: {
61
+ merge: false,
62
+ mergeReverse: false,
63
+ reverse: false,
64
+ position: "flex-end",
65
+ ok: {
66
+ enable: true,
67
+ size: void 0,
68
+ icon: void 0,
69
+ rightIcon: false,
70
+ iconIsLoading: false,
71
+ text: "确定",
72
+ type: "primary",
73
+ callback(event) {
74
+ event.close();
75
+ },
74
76
  },
75
- },
76
- cancel: {
77
- enable: true,
78
- size: void 0,
79
- icon: void 0,
80
- rightIcon: false,
81
- iconIsLoading: false,
82
- text: "关闭",
83
- type: "default",
84
- callback(event) {
85
- event.close();
77
+ cancel: {
78
+ enable: true,
79
+ size: void 0,
80
+ icon: void 0,
81
+ rightIcon: false,
82
+ iconIsLoading: false,
83
+ text: "关闭",
84
+ type: "default",
85
+ callback(event) {
86
+ event.close();
87
+ },
86
88
  },
87
- },
88
- other: {
89
- enable: false,
90
- size: void 0,
91
- icon: void 0,
92
- rightIcon: false,
93
- iconIsLoading: false,
94
- text: "其它按钮",
95
- type: "default",
96
- callback(event) {
97
- event.close();
89
+ other: {
90
+ enable: false,
91
+ size: void 0,
92
+ icon: void 0,
93
+ rightIcon: false,
94
+ iconIsLoading: false,
95
+ text: "其它按钮",
96
+ type: "default",
97
+ callback(event) {
98
+ event.close();
99
+ },
98
100
  },
99
- },
100
- close: {
101
- enable: true,
102
- callback(event) {
103
- event.close();
101
+ close: {
102
+ enable: true,
103
+ callback(event) {
104
+ event.close();
105
+ },
104
106
  },
105
107
  },
106
- },
107
- class: "",
108
- only: false,
109
- width: "500px",
110
- height: "400px",
111
- position: "center",
112
- animation: "pops-anim-fadein-zoom",
113
- zIndex: 10000,
114
- mask: {
115
- enable: false,
116
- clickEvent: {
117
- toClose: false,
118
- toHide: false,
108
+ class: "",
109
+ only: false,
110
+ width: "500px",
111
+ height: "400px",
112
+ position: "center",
113
+ animation: "pops-anim-fadein-zoom",
114
+ zIndex: 10000,
115
+ mask: {
116
+ enable: false,
117
+ clickEvent: {
118
+ toClose: false,
119
+ toHide: false,
120
+ },
121
+ clickCallBack: void 0,
119
122
  },
120
- clickCallBack: void 0,
121
- },
122
- drag: false,
123
- dragLimit: true,
124
- dragExtraDistance: 3,
125
- dragMoveCallBack() {},
126
- dragEndCallBack() {},
127
- forbiddenScroll: false,
128
- style: null,
129
- beforeAppendToPageCallBack() {},
123
+ drag: false,
124
+ dragLimit: true,
125
+ dragExtraDistance: 3,
126
+ dragMoveCallBack() {},
127
+ dragEndCallBack() {},
128
+ forbiddenScroll: false,
129
+ style: null,
130
+ beforeAppendToPageCallBack() {},
131
+ };
130
132
  };
@@ -21,7 +21,7 @@ export class PopsFolder {
21
21
  pops.config.cssText.folderCSS,
22
22
  ]);
23
23
 
24
- let config: Required<PopsFolderDetails> = PopsFolderConfig;
24
+ let config: Required<PopsFolderDetails> = PopsFolderConfig();
25
25
 
26
26
  /* 办公几件套 */
27
27
  (Folder_ICON as any).docx = Folder_ICON.doc;
@@ -1,58 +1,60 @@
1
1
  import type { PopsIframeDetails } from "./indexType";
2
2
 
3
- export const PopsIframeConfig: Required<PopsIframeDetails> = {
4
- title: {
5
- position: "center",
6
- text: "",
7
- html: false,
8
- style: "",
9
- },
10
- loading: {
11
- enable: true,
12
- icon: true,
13
- text: "",
14
- },
15
- class: "",
16
- url: window.location.href,
17
- only: false,
18
- zIndex: 10000,
19
- mask: {
20
- enable: false,
21
- clickEvent: {
22
- toClose: false,
23
- toHide: false,
24
- },
25
-
26
- clickCallBack: void 0,
27
- },
28
- animation: "pops-anim-fadein-zoom",
29
- position: "center",
30
- drag: false,
31
- dragLimit: true,
32
- dragExtraDistance: 3,
33
- dragMoveCallBack() {},
34
- dragEndCallBack() {},
35
- width: "300px",
36
- height: "250px",
37
- topRightButton: "min|max|mise|close",
38
- sandbox: false,
39
- forbiddenScroll: false,
40
- loadEndCallBack() {},
41
- btn: {
42
- min: {
43
- callback() {},
3
+ export const PopsIframeConfig = (): Required<PopsIframeDetails> => {
4
+ return {
5
+ title: {
6
+ position: "center",
7
+ text: "",
8
+ html: false,
9
+ style: "",
44
10
  },
45
- max: {
46
- callback() {},
11
+ loading: {
12
+ enable: true,
13
+ icon: true,
14
+ text: "",
47
15
  },
48
- mise: {
49
- callback() {},
16
+ class: "",
17
+ url: window.location.href,
18
+ only: false,
19
+ zIndex: 10000,
20
+ mask: {
21
+ enable: false,
22
+ clickEvent: {
23
+ toClose: false,
24
+ toHide: false,
25
+ },
26
+
27
+ clickCallBack: void 0,
50
28
  },
51
- close: {
52
- callback() {},
29
+ animation: "pops-anim-fadein-zoom",
30
+ position: "center",
31
+ drag: false,
32
+ dragLimit: true,
33
+ dragExtraDistance: 3,
34
+ dragMoveCallBack() {},
35
+ dragEndCallBack() {},
36
+ width: "300px",
37
+ height: "250px",
38
+ topRightButton: "min|max|mise|close",
39
+ sandbox: false,
40
+ forbiddenScroll: false,
41
+ loadEndCallBack() {},
42
+ btn: {
43
+ min: {
44
+ callback() {},
45
+ },
46
+ max: {
47
+ callback() {},
48
+ },
49
+ mise: {
50
+ callback() {},
51
+ },
52
+ close: {
53
+ callback() {},
54
+ },
53
55
  },
54
- },
55
56
 
56
- style: null,
57
- beforeAppendToPageCallBack() {},
57
+ style: null,
58
+ beforeAppendToPageCallBack() {},
59
+ };
58
60
  };
@@ -20,7 +20,7 @@ export class PopsIframe {
20
20
  pops.config.cssText.iframeCSS,
21
21
  ]);
22
22
 
23
- let config: Required<PopsIframeDetails> = PopsIframeConfig;
23
+ let config: Required<PopsIframeDetails> = PopsIframeConfig();
24
24
  config = popsUtils.assign(config, details);
25
25
  if (config.url == null) {
26
26
  throw "config.url不能为空";
@@ -1,27 +1,29 @@
1
1
  import type { PopsLoadingDetails } from "./indexType";
2
2
 
3
- export const PopsLoadingConfig: Required<PopsLoadingDetails> = {
4
- parent: document.body,
5
- content: {
6
- text: "加载中...",
7
- icon: "loading",
8
- style: "",
9
- },
10
- class: "",
11
- only: false,
12
- zIndex: 10000,
13
- mask: {
14
- enable: false,
15
- clickEvent: {
16
- toClose: false,
17
- toHide: false,
3
+ export const PopsLoadingConfig = (): Required<PopsLoadingDetails> => {
4
+ return {
5
+ parent: document.body,
6
+ content: {
7
+ text: "加载中...",
8
+ icon: "loading",
9
+ style: "",
18
10
  },
11
+ class: "",
12
+ only: false,
13
+ zIndex: 10000,
14
+ mask: {
15
+ enable: false,
16
+ clickEvent: {
17
+ toClose: false,
18
+ toHide: false,
19
+ },
19
20
 
20
- clickCallBack: void 0,
21
- },
22
- animation: "pops-anim-fadein-zoom",
23
- forbiddenScroll: false,
21
+ clickCallBack: void 0,
22
+ },
23
+ animation: "pops-anim-fadein-zoom",
24
+ forbiddenScroll: false,
24
25
 
25
- style: null,
26
- addIndexCSS: true,
26
+ style: null,
27
+ addIndexCSS: true,
28
+ };
27
29
  };
@@ -8,7 +8,7 @@ import type { PopsLoadingDetails } from "./indexType";
8
8
 
9
9
  export class PopsLoading {
10
10
  constructor(details: PopsLoadingDetails) {
11
- let config: Required<PopsLoadingDetails> = PopsLoadingConfig;
11
+ let config: Required<PopsLoadingDetails> = PopsLoadingConfig();
12
12
  config = popsUtils.assign(config, details);
13
13
  let guid = popsUtils.getRandomGUID();
14
14
  const PopsType = "loading";