@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,24 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* config实例配置
|
|
3
|
-
*/
|
|
4
|
-
export interface PopsInstConfig {
|
|
5
|
-
/** 固定id */
|
|
6
|
-
guid: string;
|
|
7
|
-
/** 动画元素 */
|
|
8
|
-
animElement: HTMLDivElement;
|
|
9
|
-
/** 主元素 */
|
|
10
|
-
popsElement: HTMLDivElement;
|
|
11
|
-
/** 遮罩层元素 */
|
|
12
|
-
maskElement?: HTMLDivElement;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* config实例通用配置
|
|
16
|
-
*/
|
|
17
|
-
export interface PopsInstCommonConfig extends PopsInstConfig {
|
|
18
|
-
/** shadow容器 */
|
|
19
|
-
$shadowContainer: HTMLDivElement;
|
|
20
|
-
/** shadow容器的shandowRoot */
|
|
21
|
-
$shadowRoot: ShadowRoot | HTMLElement;
|
|
22
|
-
/** 移除实例前的回调函数 */
|
|
23
|
-
beforeRemoveCallBack?: (instCommonConfig: PopsInstCommonConfig) => void;
|
|
24
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* config实例配置
|
|
3
|
+
*/
|
|
4
|
+
export interface PopsInstConfig {
|
|
5
|
+
/** 固定id */
|
|
6
|
+
guid: string;
|
|
7
|
+
/** 动画元素 */
|
|
8
|
+
animElement: HTMLDivElement;
|
|
9
|
+
/** 主元素 */
|
|
10
|
+
popsElement: HTMLDivElement;
|
|
11
|
+
/** 遮罩层元素 */
|
|
12
|
+
maskElement?: HTMLDivElement;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* config实例通用配置
|
|
16
|
+
*/
|
|
17
|
+
export interface PopsInstCommonConfig extends PopsInstConfig {
|
|
18
|
+
/** shadow容器 */
|
|
19
|
+
$shadowContainer: HTMLDivElement;
|
|
20
|
+
/** shadow容器的shandowRoot */
|
|
21
|
+
$shadowRoot: ShadowRoot | HTMLElement;
|
|
22
|
+
/** 移除实例前的回调函数 */
|
|
23
|
+
beforeRemoveCallBack?: (instCommonConfig: PopsInstCommonConfig) => void;
|
|
24
|
+
}
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
import type { PopsAlertDetails } from "../components/alert/types";
|
|
2
|
-
import type { PopsConfirmDetails } from "../components/confirm/types";
|
|
3
|
-
import type { PopsDrawerDetails } from "../components/drawer/types";
|
|
4
|
-
import type { PopsFolderDetails } from "../components/folder/types";
|
|
5
|
-
import type { PopsIframeDetails } from "../components/iframe/types";
|
|
6
|
-
import type { PopsLoadingDetails } from "../components/loading/types";
|
|
7
|
-
import type { PopsPanelButtonDetails } from "../components/panel/types/components-button";
|
|
8
|
-
import type { PopsPanelDeepMenuDetails } from "../components/panel/types/components-deepMenu";
|
|
9
|
-
import type { PopsPanelDetails } from "../components/panel/types";
|
|
10
|
-
import type { PopsPanelInputDetails } from "../components/panel/types/components-input";
|
|
11
|
-
import type { PopsPanelOwnDetails } from "../components/panel/types/components-own";
|
|
12
|
-
import type { PopsPanelSelectDetails } from "../components/panel/types/components-select";
|
|
13
|
-
import type { PopsPanelSliderDetails } from "../components/panel/types/components-slider";
|
|
14
|
-
import type { PopsPanelSwitchDetails } from "../components/panel/types/components-switch";
|
|
15
|
-
import type { PopsPanelTextAreaDetails } from "../components/panel/types/components-textarea";
|
|
16
|
-
import type { PopsPromptDetails } from "../components/prompt/types/index";
|
|
17
|
-
import type { PopsRightClickMenuDetails } from "../components/rightClickMenu/types";
|
|
18
|
-
import type { PopsToolTipDetails } from "../components/tooltip/types/index";
|
|
19
|
-
import type { PopsSearchSuggestionDetails } from "../components/searchSuggestion/types";
|
|
20
|
-
|
|
21
|
-
export interface PopsUtilsOwnObject<V> {
|
|
22
|
-
[key: string]: V | PopsUtilsOwnObject<V>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** pops所有的类型配置 11个*/
|
|
26
|
-
export interface PopsDetails {
|
|
27
|
-
alert: PopsAlertDetails;
|
|
28
|
-
confirm: PopsConfirmDetails;
|
|
29
|
-
prompt: PopsPromptDetails;
|
|
30
|
-
loading: PopsLoadingDetails;
|
|
31
|
-
iframe: PopsIframeDetails;
|
|
32
|
-
tooltip: PopsToolTipDetails;
|
|
33
|
-
drawer: PopsDrawerDetails;
|
|
34
|
-
folder: PopsFolderDetails;
|
|
35
|
-
panel: PopsPanelDetails;
|
|
36
|
-
rightClickMenu: PopsRightClickMenuDetails;
|
|
37
|
-
searchSuggestion: PopsSearchSuggestionDetails;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/** pops的类型 */
|
|
41
|
-
export type PopsType = keyof PopsDetails;
|
|
42
|
-
|
|
43
|
-
/** pops中支持only的配置 */
|
|
44
|
-
export type PopsSupportOnlyDetails = Omit<PopsDetails, "searchSuggestion">;
|
|
45
|
-
|
|
46
|
-
/** 存储实例的类型 */
|
|
47
|
-
export type PopsInstStoreType = keyof Omit<PopsDetails, "searchSuggestion">;
|
|
48
|
-
|
|
49
|
-
/** pops弹窗支持动画元素的配置 8个 */
|
|
50
|
-
export type PopsSupportAnimDetails = Omit<PopsDetails, "tooltip" | "rightClickMenu" | "searchSuggestion">;
|
|
51
|
-
|
|
52
|
-
/** pops弹窗支持动画元素的类型 */
|
|
53
|
-
export type PopsSupportAnimDetailsType = keyof PopsSupportAnimDetails;
|
|
54
|
-
|
|
55
|
-
/** pops弹窗支持标题栏的配置 */
|
|
56
|
-
export type PopsSupportHeaderTitleDetails = Pick<
|
|
57
|
-
PopsDetails,
|
|
58
|
-
"alert" | "confirm" | "prompt" | "iframe" | "drawer" | "folder" | "panel"
|
|
59
|
-
>;
|
|
60
|
-
|
|
61
|
-
/** pops弹窗支持标题栏的类型 */
|
|
62
|
-
export type PopsSupportHeaderTitleDetailsType = keyof PopsSupportHeaderTitleDetails;
|
|
63
|
-
|
|
64
|
-
/** pops支持底部按钮的配置 */
|
|
65
|
-
export type PopsSupportBottomBtnDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer">;
|
|
66
|
-
|
|
67
|
-
/** pops支持底部按钮的类型 */
|
|
68
|
-
export type PopsSupportBottomBtnDetailsType = keyof PopsSupportHeaderTitleDetails;
|
|
69
|
-
|
|
70
|
-
/** pops支持中间内容的配置 */
|
|
71
|
-
export type PopsSupportContentDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer" | "loading">;
|
|
72
|
-
|
|
73
|
-
/** pops支持中间内容的类型 */
|
|
74
|
-
export type PopsSupportContentDetailsType = keyof PopsSupportContentDetails;
|
|
75
|
-
|
|
76
|
-
/** panel的各种类型的配置项 */
|
|
77
|
-
export type PopsPanelFormsTotalDetails =
|
|
78
|
-
| PopsPanelSwitchDetails
|
|
79
|
-
| PopsPanelSliderDetails
|
|
80
|
-
| PopsPanelInputDetails
|
|
81
|
-
| PopsPanelTextAreaDetails
|
|
82
|
-
| PopsPanelSelectDetails<any>
|
|
83
|
-
| PopsPanelButtonDetails
|
|
84
|
-
| PopsPanelDeepMenuDetails
|
|
85
|
-
| PopsPanelOwnDetails;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* pops.xxx的调用返回值
|
|
89
|
-
*/
|
|
90
|
-
export interface PopsCallResult {
|
|
91
|
-
/** 唯一标识id */
|
|
92
|
-
guid: string;
|
|
93
|
-
/** 影子元素 */
|
|
94
|
-
$shadowContainer: HTMLDivElement;
|
|
95
|
-
/** 影子元素的根节点 */
|
|
96
|
-
$shadowRoot: ShadowRoot | HTMLElement;
|
|
97
|
-
/** 元素 */
|
|
98
|
-
element: HTMLDivElement;
|
|
99
|
-
/** 动画层元素 */
|
|
100
|
-
animElement: HTMLDivElement;
|
|
101
|
-
/** pops元素 */
|
|
102
|
-
popsElement: HTMLDivElement;
|
|
103
|
-
/** 遮罩层元素 */
|
|
104
|
-
maskElement?: HTMLDivElement;
|
|
105
|
-
/** 关闭弹窗 */
|
|
106
|
-
close(): void;
|
|
107
|
-
/** 隐藏弹窗 */
|
|
108
|
-
hide(): void;
|
|
109
|
-
/** 显示弹窗 */
|
|
110
|
-
show(): void;
|
|
111
|
-
}
|
|
1
|
+
import type { PopsAlertDetails } from "../components/alert/types";
|
|
2
|
+
import type { PopsConfirmDetails } from "../components/confirm/types";
|
|
3
|
+
import type { PopsDrawerDetails } from "../components/drawer/types";
|
|
4
|
+
import type { PopsFolderDetails } from "../components/folder/types";
|
|
5
|
+
import type { PopsIframeDetails } from "../components/iframe/types";
|
|
6
|
+
import type { PopsLoadingDetails } from "../components/loading/types";
|
|
7
|
+
import type { PopsPanelButtonDetails } from "../components/panel/types/components-button";
|
|
8
|
+
import type { PopsPanelDeepMenuDetails } from "../components/panel/types/components-deepMenu";
|
|
9
|
+
import type { PopsPanelDetails } from "../components/panel/types";
|
|
10
|
+
import type { PopsPanelInputDetails } from "../components/panel/types/components-input";
|
|
11
|
+
import type { PopsPanelOwnDetails } from "../components/panel/types/components-own";
|
|
12
|
+
import type { PopsPanelSelectDetails } from "../components/panel/types/components-select";
|
|
13
|
+
import type { PopsPanelSliderDetails } from "../components/panel/types/components-slider";
|
|
14
|
+
import type { PopsPanelSwitchDetails } from "../components/panel/types/components-switch";
|
|
15
|
+
import type { PopsPanelTextAreaDetails } from "../components/panel/types/components-textarea";
|
|
16
|
+
import type { PopsPromptDetails } from "../components/prompt/types/index";
|
|
17
|
+
import type { PopsRightClickMenuDetails } from "../components/rightClickMenu/types";
|
|
18
|
+
import type { PopsToolTipDetails } from "../components/tooltip/types/index";
|
|
19
|
+
import type { PopsSearchSuggestionDetails } from "../components/searchSuggestion/types";
|
|
20
|
+
|
|
21
|
+
export interface PopsUtilsOwnObject<V> {
|
|
22
|
+
[key: string]: V | PopsUtilsOwnObject<V>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** pops所有的类型配置 11个*/
|
|
26
|
+
export interface PopsDetails {
|
|
27
|
+
alert: PopsAlertDetails;
|
|
28
|
+
confirm: PopsConfirmDetails;
|
|
29
|
+
prompt: PopsPromptDetails;
|
|
30
|
+
loading: PopsLoadingDetails;
|
|
31
|
+
iframe: PopsIframeDetails;
|
|
32
|
+
tooltip: PopsToolTipDetails;
|
|
33
|
+
drawer: PopsDrawerDetails;
|
|
34
|
+
folder: PopsFolderDetails;
|
|
35
|
+
panel: PopsPanelDetails;
|
|
36
|
+
rightClickMenu: PopsRightClickMenuDetails;
|
|
37
|
+
searchSuggestion: PopsSearchSuggestionDetails;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** pops的类型 */
|
|
41
|
+
export type PopsType = keyof PopsDetails;
|
|
42
|
+
|
|
43
|
+
/** pops中支持only的配置 */
|
|
44
|
+
export type PopsSupportOnlyDetails = Omit<PopsDetails, "searchSuggestion">;
|
|
45
|
+
|
|
46
|
+
/** 存储实例的类型 */
|
|
47
|
+
export type PopsInstStoreType = keyof Omit<PopsDetails, "searchSuggestion">;
|
|
48
|
+
|
|
49
|
+
/** pops弹窗支持动画元素的配置 8个 */
|
|
50
|
+
export type PopsSupportAnimDetails = Omit<PopsDetails, "tooltip" | "rightClickMenu" | "searchSuggestion">;
|
|
51
|
+
|
|
52
|
+
/** pops弹窗支持动画元素的类型 */
|
|
53
|
+
export type PopsSupportAnimDetailsType = keyof PopsSupportAnimDetails;
|
|
54
|
+
|
|
55
|
+
/** pops弹窗支持标题栏的配置 */
|
|
56
|
+
export type PopsSupportHeaderTitleDetails = Pick<
|
|
57
|
+
PopsDetails,
|
|
58
|
+
"alert" | "confirm" | "prompt" | "iframe" | "drawer" | "folder" | "panel"
|
|
59
|
+
>;
|
|
60
|
+
|
|
61
|
+
/** pops弹窗支持标题栏的类型 */
|
|
62
|
+
export type PopsSupportHeaderTitleDetailsType = keyof PopsSupportHeaderTitleDetails;
|
|
63
|
+
|
|
64
|
+
/** pops支持底部按钮的配置 */
|
|
65
|
+
export type PopsSupportBottomBtnDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer">;
|
|
66
|
+
|
|
67
|
+
/** pops支持底部按钮的类型 */
|
|
68
|
+
export type PopsSupportBottomBtnDetailsType = keyof PopsSupportHeaderTitleDetails;
|
|
69
|
+
|
|
70
|
+
/** pops支持中间内容的配置 */
|
|
71
|
+
export type PopsSupportContentDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer" | "loading">;
|
|
72
|
+
|
|
73
|
+
/** pops支持中间内容的类型 */
|
|
74
|
+
export type PopsSupportContentDetailsType = keyof PopsSupportContentDetails;
|
|
75
|
+
|
|
76
|
+
/** panel的各种类型的配置项 */
|
|
77
|
+
export type PopsPanelFormsTotalDetails =
|
|
78
|
+
| PopsPanelSwitchDetails
|
|
79
|
+
| PopsPanelSliderDetails
|
|
80
|
+
| PopsPanelInputDetails
|
|
81
|
+
| PopsPanelTextAreaDetails
|
|
82
|
+
| PopsPanelSelectDetails<any>
|
|
83
|
+
| PopsPanelButtonDetails
|
|
84
|
+
| PopsPanelDeepMenuDetails
|
|
85
|
+
| PopsPanelOwnDetails;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* pops.xxx的调用返回值
|
|
89
|
+
*/
|
|
90
|
+
export interface PopsCallResult {
|
|
91
|
+
/** 唯一标识id */
|
|
92
|
+
guid: string;
|
|
93
|
+
/** 影子元素 */
|
|
94
|
+
$shadowContainer: HTMLDivElement;
|
|
95
|
+
/** 影子元素的根节点 */
|
|
96
|
+
$shadowRoot: ShadowRoot | HTMLElement;
|
|
97
|
+
/** 元素 */
|
|
98
|
+
element: HTMLDivElement;
|
|
99
|
+
/** 动画层元素 */
|
|
100
|
+
animElement: HTMLDivElement;
|
|
101
|
+
/** pops元素 */
|
|
102
|
+
popsElement: HTMLDivElement;
|
|
103
|
+
/** 遮罩层元素 */
|
|
104
|
+
maskElement?: HTMLDivElement;
|
|
105
|
+
/** 关闭弹窗 */
|
|
106
|
+
close(): void;
|
|
107
|
+
/** 隐藏弹窗 */
|
|
108
|
+
hide(): void;
|
|
109
|
+
/** 显示弹窗 */
|
|
110
|
+
show(): void;
|
|
111
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import type { PopsAlertDetails } from "../components/alert/types";
|
|
2
|
-
import type { PopsDrawerDetails } from "../components/drawer/types";
|
|
3
|
-
import type { PopsFolderDetails } from "../components/folder/types";
|
|
4
|
-
import type { PopsIframeDetails } from "../components/iframe/types";
|
|
5
|
-
import type { PopsLoadingDetails } from "../components/loading/types";
|
|
6
|
-
import type { PopsPanelDetails } from "../components/panel/types";
|
|
7
|
-
import type { PopsPromptDetails } from "../components/prompt/types/index";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 遮罩层配置
|
|
11
|
-
*/
|
|
12
|
-
export interface PopsMaskDetails {
|
|
13
|
-
/**
|
|
14
|
-
* 是否启用遮罩层,默认false
|
|
15
|
-
* @default false
|
|
16
|
-
*/
|
|
17
|
-
enable?: boolean;
|
|
18
|
-
clickEvent?: {
|
|
19
|
-
/**
|
|
20
|
-
* 点击遮罩层是否触发关闭事件
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
|
-
toClose?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* 点击遮罩层是否触发隐藏事件
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
toHide?: boolean;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* 遮罩层自定义的点击事件
|
|
32
|
-
* @param originalRun 当toClose为true,它是关闭弹窗,当toHide为true,它是隐藏弹窗
|
|
33
|
-
* @param config 配置信息
|
|
34
|
-
*/
|
|
35
|
-
clickCallBack?:
|
|
36
|
-
| ((
|
|
37
|
-
originalRun: () => void | Promise<void>,
|
|
38
|
-
config:
|
|
39
|
-
| PopsAlertDetails
|
|
40
|
-
| PopsDrawerDetails
|
|
41
|
-
| PopsIframeDetails
|
|
42
|
-
| PopsPromptDetails
|
|
43
|
-
| PopsFolderDetails
|
|
44
|
-
| PopsLoadingDetails
|
|
45
|
-
| PopsPanelDetails
|
|
46
|
-
) => void)
|
|
47
|
-
| undefined
|
|
48
|
-
| null;
|
|
49
|
-
}
|
|
1
|
+
import type { PopsAlertDetails } from "../components/alert/types";
|
|
2
|
+
import type { PopsDrawerDetails } from "../components/drawer/types";
|
|
3
|
+
import type { PopsFolderDetails } from "../components/folder/types";
|
|
4
|
+
import type { PopsIframeDetails } from "../components/iframe/types";
|
|
5
|
+
import type { PopsLoadingDetails } from "../components/loading/types";
|
|
6
|
+
import type { PopsPanelDetails } from "../components/panel/types";
|
|
7
|
+
import type { PopsPromptDetails } from "../components/prompt/types/index";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 遮罩层配置
|
|
11
|
+
*/
|
|
12
|
+
export interface PopsMaskDetails {
|
|
13
|
+
/**
|
|
14
|
+
* 是否启用遮罩层,默认false
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
enable?: boolean;
|
|
18
|
+
clickEvent?: {
|
|
19
|
+
/**
|
|
20
|
+
* 点击遮罩层是否触发关闭事件
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
toClose?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 点击遮罩层是否触发隐藏事件
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
toHide?: boolean;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 遮罩层自定义的点击事件
|
|
32
|
+
* @param originalRun 当toClose为true,它是关闭弹窗,当toHide为true,它是隐藏弹窗
|
|
33
|
+
* @param config 配置信息
|
|
34
|
+
*/
|
|
35
|
+
clickCallBack?:
|
|
36
|
+
| ((
|
|
37
|
+
originalRun: () => void | Promise<void>,
|
|
38
|
+
config:
|
|
39
|
+
| PopsAlertDetails
|
|
40
|
+
| PopsDrawerDetails
|
|
41
|
+
| PopsIframeDetails
|
|
42
|
+
| PopsPromptDetails
|
|
43
|
+
| PopsFolderDetails
|
|
44
|
+
| PopsLoadingDetails
|
|
45
|
+
| PopsPanelDetails
|
|
46
|
+
) => void)
|
|
47
|
+
| undefined
|
|
48
|
+
| null;
|
|
49
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 弹窗位置
|
|
3
|
-
*/
|
|
4
|
-
export type PopsPosition =
|
|
5
|
-
| "top_left"
|
|
6
|
-
| "top"
|
|
7
|
-
| "top_right"
|
|
8
|
-
| "center_left"
|
|
9
|
-
| "center"
|
|
10
|
-
| "center_right"
|
|
11
|
-
| "bottom_left"
|
|
12
|
-
| "bottom"
|
|
13
|
-
| "bottom_right";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 按钮位置
|
|
17
|
-
*/
|
|
18
|
-
export type PopsJustifyContent =
|
|
19
|
-
| "center"
|
|
20
|
-
| "end"
|
|
21
|
-
| "flex-end"
|
|
22
|
-
| "flex-start"
|
|
23
|
-
| "left"
|
|
24
|
-
| "normal"
|
|
25
|
-
| "right"
|
|
26
|
-
| "space-around"
|
|
27
|
-
| "space-between"
|
|
28
|
-
| "space-evenly"
|
|
29
|
-
| "start"
|
|
30
|
-
| "stretch"
|
|
31
|
-
| "inherit"
|
|
32
|
-
| "initial"
|
|
33
|
-
| "revert"
|
|
34
|
-
| "revert-layer"
|
|
35
|
-
| "unset";
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* text-align
|
|
39
|
-
*/
|
|
40
|
-
export type PopsTextAlign =
|
|
41
|
-
| "center"
|
|
42
|
-
| "end"
|
|
43
|
-
| "justify"
|
|
44
|
-
| "left"
|
|
45
|
-
| "right"
|
|
46
|
-
| "start"
|
|
47
|
-
| "-webkit-auto"
|
|
48
|
-
| "-moz-center-or-inherit"
|
|
49
|
-
| "-webkit-center"
|
|
50
|
-
| "-moz-center"
|
|
51
|
-
| "-webkit-left"
|
|
52
|
-
| "-moz-left"
|
|
53
|
-
| "-webkit-match-parent"
|
|
54
|
-
| "-webkit-right"
|
|
55
|
-
| "-moz-right"
|
|
56
|
-
| "inherit"
|
|
57
|
-
| "initial"
|
|
58
|
-
| "revert"
|
|
59
|
-
| "revert-layer"
|
|
60
|
-
| "unset";
|
|
1
|
+
/**
|
|
2
|
+
* 弹窗位置
|
|
3
|
+
*/
|
|
4
|
+
export type PopsPosition =
|
|
5
|
+
| "top_left"
|
|
6
|
+
| "top"
|
|
7
|
+
| "top_right"
|
|
8
|
+
| "center_left"
|
|
9
|
+
| "center"
|
|
10
|
+
| "center_right"
|
|
11
|
+
| "bottom_left"
|
|
12
|
+
| "bottom"
|
|
13
|
+
| "bottom_right";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 按钮位置
|
|
17
|
+
*/
|
|
18
|
+
export type PopsJustifyContent =
|
|
19
|
+
| "center"
|
|
20
|
+
| "end"
|
|
21
|
+
| "flex-end"
|
|
22
|
+
| "flex-start"
|
|
23
|
+
| "left"
|
|
24
|
+
| "normal"
|
|
25
|
+
| "right"
|
|
26
|
+
| "space-around"
|
|
27
|
+
| "space-between"
|
|
28
|
+
| "space-evenly"
|
|
29
|
+
| "start"
|
|
30
|
+
| "stretch"
|
|
31
|
+
| "inherit"
|
|
32
|
+
| "initial"
|
|
33
|
+
| "revert"
|
|
34
|
+
| "revert-layer"
|
|
35
|
+
| "unset";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* text-align
|
|
39
|
+
*/
|
|
40
|
+
export type PopsTextAlign =
|
|
41
|
+
| "center"
|
|
42
|
+
| "end"
|
|
43
|
+
| "justify"
|
|
44
|
+
| "left"
|
|
45
|
+
| "right"
|
|
46
|
+
| "start"
|
|
47
|
+
| "-webkit-auto"
|
|
48
|
+
| "-moz-center-or-inherit"
|
|
49
|
+
| "-webkit-center"
|
|
50
|
+
| "-moz-center"
|
|
51
|
+
| "-webkit-left"
|
|
52
|
+
| "-moz-left"
|
|
53
|
+
| "-webkit-match-parent"
|
|
54
|
+
| "-webkit-right"
|
|
55
|
+
| "-moz-right"
|
|
56
|
+
| "inherit"
|
|
57
|
+
| "initial"
|
|
58
|
+
| "revert"
|
|
59
|
+
| "revert-layer"
|
|
60
|
+
| "unset";
|
package/index.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whitesev/pops",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.7",
|
|
4
4
|
"description": "弹窗库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/WhiteSevs/TamperMonkeyScript/tree/master/lib/pops#readme",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"src",
|
|
26
|
+
"./index.ts"
|
|
25
27
|
],
|
|
26
28
|
"publishConfig": {
|
|
27
29
|
"registry": "https://registry.npmjs.org/"
|