@whitesev/pops 1.9.0 → 1.9.2
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 +288 -170
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +288 -170
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +288 -170
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +288 -170
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +288 -170
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +288 -170
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/GlobalConfig.d.ts +1 -0
- package/dist/types/src/Pops.d.ts +2 -0
- package/dist/types/src/components/alert/config.d.ts +1 -1
- package/dist/types/src/components/confirm/config.d.ts +1 -1
- package/dist/types/src/components/drawer/config.d.ts +1 -1
- package/dist/types/src/components/folder/config.d.ts +1 -1
- package/dist/types/src/components/iframe/config.d.ts +1 -1
- package/dist/types/src/components/loading/config.d.ts +1 -1
- package/dist/types/src/components/panel/config.d.ts +1 -1
- package/dist/types/src/components/prompt/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/indexType.d.ts +4 -21
- package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
- package/dist/types/src/components/searchSuggestion/indexType.d.ts +2 -10
- package/dist/types/src/components/tooltip/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/index.d.ts +5 -5
- package/dist/types/src/components/tooltip/indexType.d.ts +28 -28
- package/dist/types/src/handler/PopsElementHandler.d.ts +1 -1
- package/dist/types/src/handler/PopsHandler.d.ts +7 -3
- package/dist/types/src/types/button.d.ts +13 -19
- package/dist/types/src/types/components.d.ts +26 -11
- package/dist/types/src/types/event.d.ts +1 -1
- package/dist/types/src/types/global.d.ts +9 -0
- package/dist/types/src/types/layer.d.ts +1 -1
- package/dist/types/src/types/mask.d.ts +14 -11
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +2 -1
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/alert/config.ts +10 -9
- package/src/components/alert/index.ts +9 -9
- package/src/components/confirm/config.ts +18 -24
- package/src/components/confirm/index.ts +9 -9
- package/src/components/drawer/config.ts +22 -21
- package/src/components/drawer/index.ts +9 -9
- package/src/components/folder/config.ts +17 -16
- package/src/components/folder/index.ts +32 -24
- package/src/components/iframe/config.ts +3 -3
- package/src/components/iframe/index.ts +15 -11
- package/src/components/loading/config.ts +3 -3
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +65 -2
- package/src/components/panel/index.ts +13 -11
- package/src/components/prompt/config.ts +17 -27
- package/src/components/prompt/index.ts +10 -8
- package/src/components/rightClickMenu/config.ts +117 -109
- package/src/components/rightClickMenu/index.ts +13 -12
- package/src/components/rightClickMenu/indexType.ts +13 -24
- package/src/components/searchSuggestion/config.ts +2 -1
- package/src/components/searchSuggestion/index.ts +11 -10
- package/src/components/searchSuggestion/indexType.ts +4 -10
- package/src/components/tooltip/config.ts +7 -5
- package/src/components/tooltip/index.ts +34 -21
- package/src/components/tooltip/indexType.ts +38 -35
- package/src/css/index.css +1 -1
- package/src/handler/PopsElementHandler.ts +2 -2
- package/src/handler/PopsHandler.ts +24 -20
- package/src/types/button.d.ts +13 -19
- package/src/types/components.d.ts +26 -11
- package/src/types/event.d.ts +1 -1
- package/src/types/global.d.ts +9 -0
- package/src/types/layer.d.ts +1 -1
- package/src/types/mask.d.ts +14 -11
- package/src/utils/PopsInstanceUtils.ts +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsAlertDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsAlertConfig = ():
|
|
3
|
+
export const PopsAlertConfig = (): DeepRequired<PopsAlertDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
text: "默认标题",
|
|
@@ -16,24 +16,25 @@ export const PopsAlertConfig = (): Required<PopsAlertDetails> => {
|
|
|
16
16
|
btn: {
|
|
17
17
|
position: "flex-end",
|
|
18
18
|
ok: {
|
|
19
|
-
size: void 0,
|
|
19
|
+
size: void 0 as any,
|
|
20
20
|
enable: true,
|
|
21
|
-
icon: void 0,
|
|
21
|
+
icon: void 0 as any,
|
|
22
22
|
rightIcon: false,
|
|
23
23
|
iconIsLoading: false,
|
|
24
24
|
text: "确定",
|
|
25
25
|
type: "primary",
|
|
26
|
-
callback: function (
|
|
27
|
-
|
|
26
|
+
callback: function (details: any) {
|
|
27
|
+
details.close();
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
close: {
|
|
31
31
|
enable: true,
|
|
32
|
-
callback: function (
|
|
33
|
-
|
|
32
|
+
callback: function (details: any) {
|
|
33
|
+
details.close();
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
+
useShadowRoot: true,
|
|
37
38
|
class: "",
|
|
38
39
|
only: false,
|
|
39
40
|
width: "350px",
|
|
@@ -47,7 +48,7 @@ export const PopsAlertConfig = (): Required<PopsAlertDetails> => {
|
|
|
47
48
|
toClose: false,
|
|
48
49
|
toHide: false,
|
|
49
50
|
},
|
|
50
|
-
clickCallBack:
|
|
51
|
+
clickCallBack: null,
|
|
51
52
|
},
|
|
52
53
|
drag: false,
|
|
53
54
|
dragLimit: true,
|
|
@@ -57,5 +58,5 @@ export const PopsAlertConfig = (): Required<PopsAlertDetails> => {
|
|
|
57
58
|
forbiddenScroll: false,
|
|
58
59
|
style: null,
|
|
59
60
|
beforeAppendToPageCallBack() {},
|
|
60
|
-
}
|
|
61
|
+
} as DeepRequired<PopsAlertDetails>;
|
|
61
62
|
};
|
|
@@ -11,7 +11,15 @@ import type { PopsAlertDetails } from "./indexType";
|
|
|
11
11
|
|
|
12
12
|
export class PopsAlert {
|
|
13
13
|
constructor(details: PopsAlertDetails) {
|
|
14
|
-
const
|
|
14
|
+
const guid = popsUtils.getRandomGUID();
|
|
15
|
+
// 设置当前类型
|
|
16
|
+
const PopsType: PopsMode = "alert";
|
|
17
|
+
let config = PopsAlertConfig();
|
|
18
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
19
|
+
config = popsUtils.assign(config, details);
|
|
20
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
21
|
+
|
|
22
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
15
23
|
PopsHandler.handleInit($shadowRoot, [
|
|
16
24
|
pops.config.cssText.index,
|
|
17
25
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -22,14 +30,6 @@ export class PopsAlert {
|
|
|
22
30
|
pops.config.cssText.alertCSS,
|
|
23
31
|
]);
|
|
24
32
|
|
|
25
|
-
let config: Required<PopsAlertDetails> = PopsAlertConfig();
|
|
26
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
27
|
-
config = popsUtils.assign(config, details);
|
|
28
|
-
let guid = popsUtils.getRandomGUID();
|
|
29
|
-
// 设置当前类型
|
|
30
|
-
const PopsType: PopsMode = "alert";
|
|
31
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
32
|
-
|
|
33
33
|
// 先把z-index提取出来
|
|
34
34
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
35
35
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsConfirmDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsConfirmConfig = ():
|
|
3
|
+
export const PopsConfirmConfig = (): DeepRequired<PopsConfirmDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
text: "默认标题",
|
|
@@ -20,53 +20,48 @@ export const PopsConfirmConfig = (): Required<PopsConfirmDetails> => {
|
|
|
20
20
|
position: "flex-end",
|
|
21
21
|
ok: {
|
|
22
22
|
enable: true,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
icon: void 0,
|
|
23
|
+
size: void 0 as any,
|
|
24
|
+
icon: void 0 as any,
|
|
27
25
|
rightIcon: false,
|
|
28
26
|
iconIsLoading: false,
|
|
29
27
|
text: "确定",
|
|
30
28
|
type: "primary",
|
|
31
|
-
callback(
|
|
32
|
-
|
|
29
|
+
callback(detail: any) {
|
|
30
|
+
detail.close();
|
|
33
31
|
},
|
|
34
32
|
},
|
|
35
33
|
cancel: {
|
|
36
34
|
enable: true,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
icon: void 0,
|
|
35
|
+
size: void 0 as any,
|
|
36
|
+
icon: void 0 as any,
|
|
41
37
|
rightIcon: false,
|
|
42
38
|
iconIsLoading: false,
|
|
43
39
|
text: "关闭",
|
|
44
40
|
type: "default",
|
|
45
|
-
callback(
|
|
46
|
-
|
|
41
|
+
callback(detail: any) {
|
|
42
|
+
detail.close();
|
|
47
43
|
},
|
|
48
44
|
},
|
|
49
45
|
other: {
|
|
50
46
|
enable: false,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
icon: void 0,
|
|
47
|
+
size: void 0 as any,
|
|
48
|
+
icon: void 0 as any,
|
|
55
49
|
rightIcon: false,
|
|
56
50
|
iconIsLoading: false,
|
|
57
51
|
text: "其它按钮",
|
|
58
52
|
type: "default",
|
|
59
|
-
callback(
|
|
60
|
-
|
|
53
|
+
callback(detail: any) {
|
|
54
|
+
detail.close();
|
|
61
55
|
},
|
|
62
56
|
},
|
|
63
57
|
close: {
|
|
64
58
|
enable: true,
|
|
65
|
-
callback(
|
|
66
|
-
|
|
59
|
+
callback(detail: any) {
|
|
60
|
+
detail.close();
|
|
67
61
|
},
|
|
68
62
|
},
|
|
69
63
|
},
|
|
64
|
+
useShadowRoot: true,
|
|
70
65
|
class: "",
|
|
71
66
|
only: false,
|
|
72
67
|
width: "350px",
|
|
@@ -80,8 +75,7 @@ export const PopsConfirmConfig = (): Required<PopsConfirmDetails> => {
|
|
|
80
75
|
toClose: false,
|
|
81
76
|
toHide: false,
|
|
82
77
|
},
|
|
83
|
-
|
|
84
|
-
clickCallBack: void 0,
|
|
78
|
+
clickCallBack: null,
|
|
85
79
|
},
|
|
86
80
|
drag: false,
|
|
87
81
|
dragLimit: true,
|
|
@@ -92,5 +86,5 @@ export const PopsConfirmConfig = (): Required<PopsConfirmDetails> => {
|
|
|
92
86
|
|
|
93
87
|
style: null,
|
|
94
88
|
beforeAppendToPageCallBack() {},
|
|
95
|
-
}
|
|
89
|
+
} as DeepRequired<PopsConfirmDetails>;
|
|
96
90
|
};
|
|
@@ -10,7 +10,15 @@ import type { PopsConfirmDetails } from "./indexType";
|
|
|
10
10
|
|
|
11
11
|
export class PopsConfirm {
|
|
12
12
|
constructor(details: PopsConfirmDetails) {
|
|
13
|
-
const
|
|
13
|
+
const guid = popsUtils.getRandomGUID();
|
|
14
|
+
// 设置当前类型
|
|
15
|
+
const PopsType = "confirm";
|
|
16
|
+
let config = PopsConfirmConfig();
|
|
17
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
18
|
+
config = popsUtils.assign(config, details);
|
|
19
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
20
|
+
|
|
21
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
14
22
|
PopsHandler.handleInit($shadowRoot, [
|
|
15
23
|
pops.config.cssText.index,
|
|
16
24
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -20,14 +28,6 @@ export class PopsConfirm {
|
|
|
20
28
|
pops.config.cssText.common,
|
|
21
29
|
pops.config.cssText.confirmCSS,
|
|
22
30
|
]);
|
|
23
|
-
let config: Required<PopsConfirmDetails> = PopsConfirmConfig();
|
|
24
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
25
|
-
config = popsUtils.assign(config, details);
|
|
26
|
-
let guid = popsUtils.getRandomGUID();
|
|
27
|
-
// 设置当前类型
|
|
28
|
-
const PopsType = "confirm";
|
|
29
|
-
|
|
30
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
31
31
|
|
|
32
32
|
// 先把z-index提取出来
|
|
33
33
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
import type { PopsDrawerDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsDrawerConfig = ():
|
|
3
|
+
export const PopsDrawerConfig = (): DeepRequired<PopsDrawerDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
enable: true,
|
|
7
7
|
position: "center",
|
|
8
8
|
text: "默认标题",
|
|
9
9
|
html: false,
|
|
10
|
+
style: "",
|
|
10
11
|
},
|
|
11
12
|
content: {
|
|
12
13
|
text: "默认内容",
|
|
13
14
|
html: false,
|
|
15
|
+
style: "",
|
|
14
16
|
},
|
|
15
17
|
btn: {
|
|
18
|
+
merge: false,
|
|
19
|
+
mergeReverse: false,
|
|
20
|
+
reverse: false,
|
|
16
21
|
position: "flex-end",
|
|
17
22
|
ok: {
|
|
18
23
|
enable: true,
|
|
19
|
-
size: void 0,
|
|
20
|
-
icon: void 0,
|
|
24
|
+
size: void 0 as any,
|
|
25
|
+
icon: void 0 as any,
|
|
21
26
|
rightIcon: false,
|
|
22
27
|
iconIsLoading: false,
|
|
23
28
|
text: "确定",
|
|
24
29
|
type: "primary",
|
|
25
|
-
callback(
|
|
26
|
-
|
|
30
|
+
callback(detail: any) {
|
|
31
|
+
detail.close();
|
|
27
32
|
},
|
|
28
33
|
},
|
|
29
34
|
cancel: {
|
|
30
35
|
enable: true,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
icon: void 0,
|
|
36
|
+
size: void 0 as any,
|
|
37
|
+
icon: void 0 as any,
|
|
35
38
|
rightIcon: false,
|
|
36
39
|
iconIsLoading: false,
|
|
37
40
|
text: "关闭",
|
|
38
41
|
type: "default",
|
|
39
|
-
callback(
|
|
40
|
-
|
|
42
|
+
callback(detail: any) {
|
|
43
|
+
detail.close();
|
|
41
44
|
},
|
|
42
45
|
},
|
|
43
46
|
other: {
|
|
44
47
|
enable: false,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
icon: void 0,
|
|
48
|
+
size: void 0 as any,
|
|
49
|
+
icon: void 0 as any,
|
|
49
50
|
rightIcon: false,
|
|
50
51
|
iconIsLoading: false,
|
|
51
52
|
text: "其它按钮",
|
|
52
53
|
type: "default",
|
|
53
|
-
callback(
|
|
54
|
-
|
|
54
|
+
callback(detail: any) {
|
|
55
|
+
detail.close();
|
|
55
56
|
},
|
|
56
57
|
},
|
|
57
58
|
close: {
|
|
58
59
|
enable: true,
|
|
59
|
-
callback(
|
|
60
|
-
|
|
60
|
+
callback(detail: any) {
|
|
61
|
+
detail.close();
|
|
61
62
|
},
|
|
62
63
|
},
|
|
63
64
|
},
|
|
@@ -67,9 +68,9 @@ export const PopsDrawerConfig = (): Required<PopsDrawerDetails> => {
|
|
|
67
68
|
toClose: true,
|
|
68
69
|
toHide: false,
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
-
clickCallBack: void 0,
|
|
71
|
+
clickCallBack: null,
|
|
72
72
|
},
|
|
73
|
+
useShadowRoot: true,
|
|
73
74
|
class: "",
|
|
74
75
|
zIndex: 10000,
|
|
75
76
|
only: false,
|
|
@@ -9,7 +9,15 @@ import type { PopsDrawerDetails } from "./indexType";
|
|
|
9
9
|
|
|
10
10
|
export class PopsDrawer {
|
|
11
11
|
constructor(details: PopsDrawerDetails) {
|
|
12
|
-
const
|
|
12
|
+
const guid = popsUtils.getRandomGUID();
|
|
13
|
+
// 设置当前类型
|
|
14
|
+
const PopsType = "drawer";
|
|
15
|
+
let config = PopsDrawerConfig();
|
|
16
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
17
|
+
config = popsUtils.assign(config, details);
|
|
18
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
19
|
+
|
|
20
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
13
21
|
PopsHandler.handleInit($shadowRoot, [
|
|
14
22
|
pops.config.cssText.index,
|
|
15
23
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -20,14 +28,6 @@ export class PopsDrawer {
|
|
|
20
28
|
pops.config.cssText.drawerCSS,
|
|
21
29
|
]);
|
|
22
30
|
|
|
23
|
-
let config: Required<PopsDrawerDetails> = PopsDrawerConfig();
|
|
24
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
25
|
-
config = popsUtils.assign(config, details);
|
|
26
|
-
let guid = popsUtils.getRandomGUID();
|
|
27
|
-
const PopsType = "drawer";
|
|
28
|
-
|
|
29
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
30
|
-
|
|
31
31
|
// 先把z-index提取出来
|
|
32
32
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
33
33
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsFolderDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsFolderConfig = ():
|
|
3
|
+
export const PopsFolderConfig = (): DeepRequired<PopsFolderDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
text: "pops.Folder",
|
|
@@ -64,47 +64,48 @@ export const PopsFolderConfig = (): Required<PopsFolderDetails> => {
|
|
|
64
64
|
position: "flex-end",
|
|
65
65
|
ok: {
|
|
66
66
|
enable: true,
|
|
67
|
-
size: void 0,
|
|
68
|
-
icon: void 0,
|
|
67
|
+
size: void 0 as any,
|
|
68
|
+
icon: void 0 as any,
|
|
69
69
|
rightIcon: false,
|
|
70
70
|
iconIsLoading: false,
|
|
71
71
|
text: "确定",
|
|
72
72
|
type: "primary",
|
|
73
|
-
callback(
|
|
74
|
-
|
|
73
|
+
callback(detail: any) {
|
|
74
|
+
detail.close();
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
cancel: {
|
|
78
78
|
enable: true,
|
|
79
|
-
size: void 0,
|
|
80
|
-
icon: void 0,
|
|
79
|
+
size: void 0 as any,
|
|
80
|
+
icon: void 0 as any,
|
|
81
81
|
rightIcon: false,
|
|
82
82
|
iconIsLoading: false,
|
|
83
83
|
text: "关闭",
|
|
84
84
|
type: "default",
|
|
85
|
-
callback(
|
|
86
|
-
|
|
85
|
+
callback(detail: any) {
|
|
86
|
+
detail.close();
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
89
|
other: {
|
|
90
90
|
enable: false,
|
|
91
|
-
size: void 0,
|
|
92
|
-
icon: void 0,
|
|
91
|
+
size: void 0 as any,
|
|
92
|
+
icon: void 0 as any,
|
|
93
93
|
rightIcon: false,
|
|
94
94
|
iconIsLoading: false,
|
|
95
95
|
text: "其它按钮",
|
|
96
96
|
type: "default",
|
|
97
|
-
callback(
|
|
98
|
-
|
|
97
|
+
callback(detail: any) {
|
|
98
|
+
detail.close();
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
close: {
|
|
102
102
|
enable: true,
|
|
103
|
-
callback(
|
|
104
|
-
|
|
103
|
+
callback(detail: any) {
|
|
104
|
+
detail.close();
|
|
105
105
|
},
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
|
+
useShadowRoot: true,
|
|
108
109
|
class: "",
|
|
109
110
|
only: false,
|
|
110
111
|
width: "500px",
|
|
@@ -118,7 +119,7 @@ export const PopsFolderConfig = (): Required<PopsFolderDetails> => {
|
|
|
118
119
|
toClose: false,
|
|
119
120
|
toHide: false,
|
|
120
121
|
},
|
|
121
|
-
clickCallBack:
|
|
122
|
+
clickCallBack: null,
|
|
122
123
|
},
|
|
123
124
|
drag: false,
|
|
124
125
|
dragLimit: true,
|
|
@@ -11,7 +11,16 @@ import type { PopsFolderDataConfig, PopsFolderDetails } from "./indexType";
|
|
|
11
11
|
|
|
12
12
|
export class PopsFolder {
|
|
13
13
|
constructor(details: PopsFolderDetails) {
|
|
14
|
-
const
|
|
14
|
+
const guid = popsUtils.getRandomGUID();
|
|
15
|
+
// 设置当前类型
|
|
16
|
+
const PopsType = "folder";
|
|
17
|
+
|
|
18
|
+
let config = PopsFolderConfig();
|
|
19
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
20
|
+
config = popsUtils.assign(config, details);
|
|
21
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
22
|
+
|
|
23
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
15
24
|
PopsHandler.handleInit($shadowRoot, [
|
|
16
25
|
pops.config.cssText.index,
|
|
17
26
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -22,17 +31,19 @@ export class PopsFolder {
|
|
|
22
31
|
pops.config.cssText.folderCSS,
|
|
23
32
|
]);
|
|
24
33
|
|
|
25
|
-
let config: Required<PopsFolderDetails> = PopsFolderConfig();
|
|
26
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
27
|
-
config = popsUtils.assign(config, details);
|
|
28
|
-
|
|
29
34
|
/* 办公几件套 */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
Folder_ICON.docx = Folder_ICON.doc;
|
|
37
|
+
// @ts-ignore;
|
|
38
|
+
Folder_ICON.rtf = Folder_ICON.doc;
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
Folder_ICON.xlsx = Folder_ICON.xls;
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
43
|
+
// @ts-ignore;
|
|
44
|
+
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
Folder_ICON.json = Folder_ICON.js;
|
|
36
47
|
|
|
37
48
|
/* 压缩包 */
|
|
38
49
|
let zipIconList = [
|
|
@@ -73,38 +84,35 @@ export class PopsFolder {
|
|
|
73
84
|
let androidIconList = ["apk", "apkm", "xapk"];
|
|
74
85
|
|
|
75
86
|
zipIconList.forEach((keyName) => {
|
|
76
|
-
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
77
89
|
});
|
|
78
90
|
imageIconList.forEach((keyName) => {
|
|
79
|
-
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
Folder_ICON[keyName] = Folder_ICON.png;
|
|
80
93
|
});
|
|
81
94
|
codeLanguageIconList.forEach((keyName) => {
|
|
82
|
-
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
Folder_ICON[keyName] = Folder_ICON.html;
|
|
83
97
|
});
|
|
84
98
|
androidIconList.forEach((keyName) => {
|
|
85
|
-
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
86
101
|
});
|
|
87
102
|
|
|
88
103
|
if (details?.folder) {
|
|
104
|
+
// @ts-ignore
|
|
89
105
|
config.folder = details.folder;
|
|
90
106
|
}
|
|
91
|
-
let guid = popsUtils.getRandomGUID();
|
|
92
|
-
const PopsType = "folder";
|
|
93
|
-
|
|
94
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
95
107
|
|
|
96
108
|
// 先把z-index提取出来
|
|
97
109
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
98
110
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
99
111
|
|
|
100
112
|
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
|
|
101
|
-
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(
|
|
102
|
-
PopsType,
|
|
103
|
-
config as any
|
|
104
|
-
);
|
|
113
|
+
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
|
|
105
114
|
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
106
115
|
PopsType,
|
|
107
|
-
|
|
108
116
|
config
|
|
109
117
|
);
|
|
110
118
|
let animHTML = PopsElementHandler.getAnimHTML(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsIframeDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsIframeConfig = ():
|
|
3
|
+
export const PopsIframeConfig = (): DeepRequired<PopsIframeDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
position: "center",
|
|
@@ -13,6 +13,7 @@ export const PopsIframeConfig = (): Required<PopsIframeDetails> => {
|
|
|
13
13
|
icon: true,
|
|
14
14
|
text: "",
|
|
15
15
|
},
|
|
16
|
+
useShadowRoot: true,
|
|
16
17
|
class: "",
|
|
17
18
|
url: window.location.href,
|
|
18
19
|
only: false,
|
|
@@ -23,8 +24,7 @@ export const PopsIframeConfig = (): Required<PopsIframeDetails> => {
|
|
|
23
24
|
toClose: false,
|
|
24
25
|
toHide: false,
|
|
25
26
|
},
|
|
26
|
-
|
|
27
|
-
clickCallBack: void 0,
|
|
27
|
+
clickCallBack: null,
|
|
28
28
|
},
|
|
29
29
|
animation: "pops-anim-fadein-zoom",
|
|
30
30
|
position: "center",
|
|
@@ -12,7 +12,19 @@ import type { PopsIframeDetails } from "./indexType";
|
|
|
12
12
|
|
|
13
13
|
export class PopsIframe {
|
|
14
14
|
constructor(details: PopsIframeDetails) {
|
|
15
|
-
const
|
|
15
|
+
const guid = popsUtils.getRandomGUID();
|
|
16
|
+
// 设置当前类型
|
|
17
|
+
const PopsType = "iframe";
|
|
18
|
+
|
|
19
|
+
let config = PopsIframeConfig();
|
|
20
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
21
|
+
config = popsUtils.assign(config, details);
|
|
22
|
+
if (config.url == null) {
|
|
23
|
+
throw "config.url不能为空";
|
|
24
|
+
}
|
|
25
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
26
|
+
|
|
27
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
16
28
|
PopsHandler.handleInit($shadowRoot, [
|
|
17
29
|
pops.config.cssText.index,
|
|
18
30
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -21,18 +33,10 @@ export class PopsIframe {
|
|
|
21
33
|
pops.config.cssText.common,
|
|
22
34
|
pops.config.cssText.iframeCSS,
|
|
23
35
|
]);
|
|
24
|
-
let config: Required<PopsIframeDetails> = PopsIframeConfig();
|
|
25
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
26
|
-
config = popsUtils.assign(config, details);
|
|
27
|
-
if (config.url == null) {
|
|
28
|
-
throw "config.url不能为空";
|
|
29
|
-
}
|
|
30
|
-
let guid = popsUtils.getRandomGUID();
|
|
31
|
-
const PopsType = "iframe";
|
|
32
36
|
|
|
33
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
34
37
|
let maskExtraStyle =
|
|
35
|
-
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
config.animation != null && config.animation != ""
|
|
36
40
|
? "position:absolute;"
|
|
37
41
|
: "";
|
|
38
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsLoadingDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsLoadingConfig = ():
|
|
3
|
+
export const PopsLoadingConfig = (): DeepRequired<PopsLoadingDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
parent: document.body,
|
|
6
6
|
content: {
|
|
@@ -8,6 +8,7 @@ export const PopsLoadingConfig = (): Required<PopsLoadingDetails> => {
|
|
|
8
8
|
icon: "loading",
|
|
9
9
|
style: "",
|
|
10
10
|
},
|
|
11
|
+
useShadowRoot: true,
|
|
11
12
|
class: "",
|
|
12
13
|
only: false,
|
|
13
14
|
zIndex: 10000,
|
|
@@ -17,8 +18,7 @@ export const PopsLoadingConfig = (): Required<PopsLoadingDetails> => {
|
|
|
17
18
|
toClose: false,
|
|
18
19
|
toHide: false,
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
-
clickCallBack: void 0,
|
|
21
|
+
clickCallBack: null,
|
|
22
22
|
},
|
|
23
23
|
animation: "pops-anim-fadein-zoom",
|
|
24
24
|
forbiddenScroll: false,
|
|
@@ -9,7 +9,7 @@ import type { PopsLoadingDetails } from "./indexType";
|
|
|
9
9
|
|
|
10
10
|
export class PopsLoading {
|
|
11
11
|
constructor(details: PopsLoadingDetails) {
|
|
12
|
-
let config
|
|
12
|
+
let config = PopsLoadingConfig();
|
|
13
13
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
14
14
|
config = popsUtils.assign(config, details);
|
|
15
15
|
let guid = popsUtils.getRandomGUID();
|