@whitesev/pops 2.6.0 → 3.0.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/dist/index.amd.js +1233 -1092
- 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 +1233 -1092
- 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 +1233 -1092
- 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 +1233 -1092
- 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 +1233 -1092
- 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 +1233 -1092
- 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/eslint.config.d.mts +2 -0
- package/dist/types/src/Pops.d.ts +98 -103
- package/dist/types/src/PopsInst.d.ts +2 -2
- package/dist/types/src/components/alert/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/alert/index.d.ts +2 -2
- package/dist/types/src/components/alert/types/index.d.ts +4 -4
- package/dist/types/src/components/confirm/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/confirm/index.d.ts +2 -2
- package/dist/types/src/components/confirm/types/index.d.ts +2 -2
- package/dist/types/src/components/drawer/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/drawer/index.d.ts +2 -2
- package/dist/types/src/components/drawer/types/index.d.ts +2 -2
- package/dist/types/src/components/folder/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/folder/index.d.ts +2 -2
- package/dist/types/src/components/folder/types/index.d.ts +31 -7
- package/dist/types/src/components/iframe/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/iframe/index.d.ts +2 -5
- package/dist/types/src/components/iframe/types/index.d.ts +13 -42
- package/dist/types/src/components/loading/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/loading/index.d.ts +2 -2
- package/dist/types/src/components/loading/types/index.d.ts +4 -4
- package/dist/types/src/components/panel/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/panel/handlerComponents.d.ts +47 -43
- package/dist/types/src/components/panel/index.d.ts +3 -3
- package/dist/types/src/components/panel/types/components-button.d.ts +7 -6
- package/dist/types/src/components/panel/types/components-common.d.ts +7 -7
- package/dist/types/src/components/panel/types/components-container.d.ts +24 -0
- package/dist/types/src/components/panel/types/components-deepMenu.d.ts +13 -13
- package/dist/types/src/components/panel/types/components-input.d.ts +6 -6
- package/dist/types/src/components/panel/types/components-own.d.ts +2 -2
- package/dist/types/src/components/panel/types/components-select.d.ts +9 -9
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +8 -8
- package/dist/types/src/components/panel/types/components-slider.d.ts +7 -7
- package/dist/types/src/components/panel/types/components-switch.d.ts +6 -6
- package/dist/types/src/components/panel/types/components-textarea.d.ts +6 -6
- package/dist/types/src/components/panel/types/index.d.ts +36 -28
- package/dist/types/src/components/prompt/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/prompt/index.d.ts +2 -2
- package/dist/types/src/components/prompt/types/index.d.ts +4 -3
- package/dist/types/src/components/rightClickMenu/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/rightClickMenu/index.d.ts +29 -27
- package/dist/types/src/components/rightClickMenu/types/index.d.ts +32 -11
- package/dist/types/src/components/searchSuggestion/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/searchSuggestion/index.d.ts +21 -6
- package/dist/types/src/components/searchSuggestion/types/index.d.ts +15 -13
- package/dist/types/src/components/tooltip/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/tooltip/index.d.ts +6 -21
- package/dist/types/src/components/tooltip/types/index.d.ts +8 -6
- package/dist/types/src/config/GlobalConfig.d.ts +3 -3
- package/dist/types/src/handler/PopsElementHandler.d.ts +6 -6
- package/dist/types/src/handler/PopsHandler.d.ts +18 -18
- package/dist/types/src/types/button.d.ts +4 -97
- package/dist/types/src/types/components.d.ts +8 -8
- package/dist/types/src/types/event.d.ts +0 -30
- package/dist/types/src/types/global.d.ts +2 -0
- package/dist/types/src/types/inst.d.ts +5 -5
- package/dist/types/src/types/main.d.ts +35 -80
- package/dist/types/src/types/mask.d.ts +18 -15
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +15 -15
- package/dist/types/src/utils/PopsUtils.d.ts +4 -0
- package/package.json +10 -10
- package/src/Pops.ts +44 -44
- package/src/PopsAnimation.ts +1 -1
- package/src/PopsInst.ts +2 -2
- package/src/components/alert/{config.ts → defaultConfig.ts} +7 -7
- package/src/components/alert/index.ts +16 -18
- package/src/components/alert/types/index.ts +4 -4
- package/src/components/confirm/{config.ts → defaultConfig.ts} +11 -11
- package/src/components/confirm/index.ts +11 -13
- package/src/components/confirm/types/index.ts +3 -3
- package/src/components/drawer/{config.ts → defaultConfig.ts} +10 -10
- package/src/components/drawer/index.ts +18 -17
- package/src/components/drawer/types/index.ts +3 -3
- package/src/components/folder/{config.ts → defaultConfig.ts} +22 -18
- package/src/components/folder/index.ts +61 -60
- package/src/components/folder/types/index.ts +31 -18
- package/src/components/iframe/{config.ts → defaultConfig.ts} +2 -2
- package/src/components/iframe/index.ts +24 -29
- package/src/components/iframe/types/index.ts +13 -56
- package/src/components/loading/{config.ts → defaultConfig.ts} +3 -3
- package/src/components/loading/index.ts +13 -11
- package/src/components/loading/types/index.ts +5 -5
- package/src/components/panel/{config.ts → defaultConfig.ts} +115 -37
- package/src/components/panel/handlerComponents.ts +446 -428
- package/src/components/panel/index.css +11 -3
- package/src/components/panel/index.ts +15 -28
- package/src/components/panel/types/components-button.ts +7 -6
- package/src/components/panel/types/components-common.ts +7 -7
- package/src/components/panel/types/components-container.ts +25 -0
- package/src/components/panel/types/components-deepMenu.ts +13 -13
- package/src/components/panel/types/components-input.ts +6 -6
- package/src/components/panel/types/components-own.ts +2 -2
- package/src/components/panel/types/components-select.ts +11 -11
- package/src/components/panel/types/components-selectMultiple.ts +8 -9
- package/src/components/panel/types/components-slider.ts +7 -7
- package/src/components/panel/types/components-switch.ts +6 -6
- package/src/components/panel/types/components-textarea.ts +6 -6
- package/src/components/panel/types/index.ts +45 -38
- package/src/components/prompt/{config.ts → defaultConfig.ts} +10 -10
- package/src/components/prompt/index.ts +13 -15
- package/src/components/prompt/types/index.ts +4 -3
- package/src/components/rightClickMenu/{config.ts → defaultConfig.ts} +20 -19
- package/src/components/rightClickMenu/index.ts +125 -108
- package/src/components/rightClickMenu/types/index.ts +36 -14
- package/src/components/searchSuggestion/{config.ts → defaultConfig.ts} +18 -11
- package/src/components/searchSuggestion/index.ts +116 -96
- package/src/components/searchSuggestion/types/index.ts +17 -15
- package/src/components/tooltip/{config.ts → defaultConfig.ts} +5 -6
- package/src/components/tooltip/index.ts +21 -21
- package/src/components/tooltip/types/index.ts +9 -7
- package/src/config/GlobalConfig.ts +2 -2
- package/src/css/common.css +6 -0
- package/src/handler/PopsElementHandler.ts +29 -30
- package/src/handler/PopsHandler.ts +43 -43
- package/src/svg/cpu.svg +7 -7
- package/src/svg/delete.svg +4 -4
- package/src/svg/documentCopy.svg +4 -4
- package/src/svg/edit.svg +7 -7
- package/src/svg/eleme.svg +4 -4
- package/src/svg/elemePlus.svg +4 -4
- package/src/svg/headset.svg +4 -4
- package/src/svg/hide.svg +7 -7
- package/src/svg/keyboard.svg +7 -7
- package/src/svg/loading.svg +4 -4
- package/src/svg/max.svg +4 -4
- package/src/svg/min.svg +2 -4
- package/src/svg/mise.svg +4 -4
- package/src/svg/monitor.svg +4 -4
- package/src/svg/next.svg +4 -4
- package/src/svg/picture.svg +7 -7
- package/src/svg/prev.svg +4 -4
- package/src/svg/search.svg +4 -4
- package/src/svg/share.svg +4 -4
- package/src/svg/upload.svg +4 -4
- package/src/svg/videoPause.svg +4 -4
- package/src/svg/videoPlay.svg +4 -4
- package/src/svg/view.svg +4 -4
- package/src/types/button.d.ts +4 -97
- package/src/types/components.d.ts +8 -8
- package/src/types/event.d.ts +0 -30
- package/src/types/global.d.ts +2 -0
- package/src/types/inst.d.ts +5 -5
- package/src/types/main.d.ts +35 -80
- package/src/types/mask.d.ts +18 -15
- package/src/utils/PopsDOMUtils.ts +34 -34
- package/src/utils/PopsInstanceUtils.ts +129 -139
- package/src/utils/PopsUtils.ts +60 -45
- package/dist/types/src/components/alert/config.d.ts +0 -2
- package/dist/types/src/components/confirm/config.d.ts +0 -2
- package/dist/types/src/components/drawer/config.d.ts +0 -2
- package/dist/types/src/components/folder/config.d.ts +0 -2
- package/dist/types/src/components/iframe/config.d.ts +0 -2
- package/dist/types/src/components/loading/config.d.ts +0 -2
- package/dist/types/src/components/panel/config.d.ts +0 -2
- package/dist/types/src/components/panel/types/components-forms.d.ts +0 -23
- package/dist/types/src/components/prompt/config.d.ts +0 -2
- package/dist/types/src/components/rightClickMenu/config.d.ts +0 -2
- package/dist/types/src/components/searchSuggestion/config.d.ts +0 -2
- package/dist/types/src/components/tooltip/config.d.ts +0 -2
- package/src/components/panel/types/components-forms.ts +0 -24
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
import type { PopsTitleConfig, PopsDragConfig,
|
|
1
|
+
import type { PopsTitleConfig, PopsDragConfig, PopsGeneralConfig } from "../../../types/components";
|
|
2
2
|
import type { PopsEventConfig } from "../../../types/event";
|
|
3
3
|
/**
|
|
4
|
-
* pops.iframe
|
|
4
|
+
* pops.iframe的按钮点击事件回调的配置参数
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
/**
|
|
8
|
-
* 动画元素(包裹着弹窗元素)
|
|
9
|
-
*/
|
|
10
|
-
animElement: HTMLElement;
|
|
11
|
-
/**
|
|
12
|
-
* 弹窗元素
|
|
13
|
-
*/
|
|
14
|
-
popsElement: HTMLElement;
|
|
15
|
-
/**
|
|
16
|
-
* 遮罩层元素,如果未设置,那么不存在
|
|
17
|
-
*/
|
|
18
|
-
maskElement?: HTMLElement;
|
|
6
|
+
export type PopsIframeClickEventConfig = PopsEventConfig & {
|
|
19
7
|
/**
|
|
20
8
|
* iframe元素
|
|
21
9
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* 使用的方法名
|
|
25
|
-
*/
|
|
26
|
-
function: "iframe";
|
|
27
|
-
/**
|
|
28
|
-
* 唯一id
|
|
29
|
-
*/
|
|
30
|
-
guid: string;
|
|
31
|
-
}
|
|
10
|
+
$iframe: HTMLIFrameElement;
|
|
11
|
+
};
|
|
32
12
|
/**
|
|
33
13
|
* pops.iframe
|
|
34
14
|
*/
|
|
35
|
-
export interface
|
|
15
|
+
export interface PopsIframeConfig extends PopsTitleConfig, PopsDragConfig, PopsGeneralConfig {
|
|
36
16
|
/**
|
|
37
17
|
* 加载配置
|
|
38
18
|
*/
|
|
@@ -61,9 +41,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
|
|
|
61
41
|
/**
|
|
62
42
|
* 点击的回调函数
|
|
63
43
|
*/
|
|
64
|
-
callback: (eventConfig:
|
|
65
|
-
iframeElement: HTMLIFrameElement;
|
|
66
|
-
}, event: MouseEvent | PointerEvent) => void;
|
|
44
|
+
callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
|
|
67
45
|
};
|
|
68
46
|
/**
|
|
69
47
|
* 最大化
|
|
@@ -72,9 +50,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
|
|
|
72
50
|
/**
|
|
73
51
|
* 点击的回调函数
|
|
74
52
|
*/
|
|
75
|
-
callback: (eventConfig:
|
|
76
|
-
iframeElement: HTMLIFrameElement;
|
|
77
|
-
}, event: MouseEvent | PointerEvent) => void;
|
|
53
|
+
callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
|
|
78
54
|
};
|
|
79
55
|
/**
|
|
80
56
|
* 窗口化
|
|
@@ -83,9 +59,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
|
|
|
83
59
|
/**
|
|
84
60
|
* 点击的回调函数
|
|
85
61
|
*/
|
|
86
|
-
callback: (eventConfig:
|
|
87
|
-
iframeElement: HTMLIFrameElement;
|
|
88
|
-
}, event: MouseEvent | PointerEvent) => void;
|
|
62
|
+
callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
|
|
89
63
|
};
|
|
90
64
|
/**
|
|
91
65
|
* 关闭
|
|
@@ -94,9 +68,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
|
|
|
94
68
|
/**
|
|
95
69
|
* 点击的回调函数
|
|
96
70
|
*/
|
|
97
|
-
callback: (eventConfig:
|
|
98
|
-
iframeElement: HTMLIFrameElement;
|
|
99
|
-
}, event: MouseEvent | PointerEvent) => void;
|
|
71
|
+
callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
|
|
100
72
|
};
|
|
101
73
|
};
|
|
102
74
|
/**
|
|
@@ -106,8 +78,9 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
|
|
|
106
78
|
url?: string;
|
|
107
79
|
/**
|
|
108
80
|
* 右上角按钮顺序:最小化、最大化、窗口化、关闭
|
|
81
|
+
* @default "min|max|mise|close"
|
|
109
82
|
*/
|
|
110
|
-
topRightButton:
|
|
83
|
+
topRightButton: string;
|
|
111
84
|
/**
|
|
112
85
|
* 是否启用沙箱,默认false
|
|
113
86
|
* @default false
|
|
@@ -116,7 +89,5 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
|
|
|
116
89
|
/**
|
|
117
90
|
* 加载完毕的回调
|
|
118
91
|
*/
|
|
119
|
-
loadEndCallBack?: (
|
|
120
|
-
iframeElement: HTMLIFrameElement;
|
|
121
|
-
}) => void;
|
|
92
|
+
loadEndCallBack?: (eventConfig: PopsIframeClickEventConfig) => void;
|
|
122
93
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsLoadingConfig } from "./types";
|
|
2
2
|
export declare const PopsLoading: {
|
|
3
|
-
init(
|
|
3
|
+
init(__config__: PopsLoadingConfig): Omit<Omit<import("../../types/event").PopsEventConfig, "$shadowContainer" | "$shadowRoot">, "function" | "type">;
|
|
4
4
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsGeneralConfig, PopsContentConfig } from "../../../types/components";
|
|
2
2
|
/**
|
|
3
3
|
* pops.loading
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface PopsLoadingConfig extends Omit<PopsGeneralConfig, "width" | "height" | "position" | "beforeAppendToPageCallBack"> {
|
|
6
6
|
/**
|
|
7
7
|
* 父元素,默认为document.body
|
|
8
|
-
* @default document.body
|
|
8
|
+
* @default document.body || document.documentElement
|
|
9
9
|
*/
|
|
10
|
-
parent?: HTMLElement;
|
|
10
|
+
$parent?: HTMLElement;
|
|
11
11
|
/**
|
|
12
12
|
* 内容配置
|
|
13
13
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { PopsPanelBottomContentConfig, PopsPanelContentConfig,
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
1
|
+
import type { PopsPanelButtonConfig } from "./types/components-button";
|
|
2
|
+
import type { PopsPanelGeneralConfig, PopsPanelRightAsideContainerConfig } from "./types/components-common";
|
|
3
|
+
import type { PopsPanelDeepViewConfig } from "./types/components-deepMenu";
|
|
4
|
+
import type { PopsPanelContainerConfig } from "./types/components-container";
|
|
5
|
+
import type { PopsPanelBottomContentConfig, PopsPanelContentConfig, PopsPanelConfig, PopsPanelViewConfig } from "./types";
|
|
6
|
+
import type { PopsPanelInputConfig } from "./types/components-input";
|
|
7
|
+
import type { PopsPanelOwnConfig } from "./types/components-own";
|
|
8
|
+
import type { PopsPanelSelectMultipleConfig } from "./types/components-selectMultiple";
|
|
9
|
+
import type { PopsPanelSelectConfig } from "./types/components-select";
|
|
10
|
+
import type { PopsPanelSliderConfig } from "./types/components-slider";
|
|
11
|
+
import type { PopsPanelSwitchConfig } from "./types/components-switch";
|
|
12
|
+
import type { PopsPanelTextAreaConfig } from "./types/components-textarea";
|
|
13
13
|
/**
|
|
14
14
|
* 处理组件(把组件配置转为组件元素)
|
|
15
15
|
*/
|
|
@@ -49,13 +49,16 @@ export declare const PanelHandlerComponents: () => {
|
|
|
49
49
|
$panelBottomLeftContainer: HTMLElement;
|
|
50
50
|
$panelBottomRightContainer: HTMLElement;
|
|
51
51
|
};
|
|
52
|
-
$
|
|
52
|
+
$data: {
|
|
53
|
+
nodeStoreConfigKey: string;
|
|
54
|
+
};
|
|
55
|
+
$config: Required<PopsPanelConfig>;
|
|
53
56
|
/**
|
|
54
57
|
* 初始化
|
|
55
|
-
* @param
|
|
58
|
+
* @param data
|
|
56
59
|
*/
|
|
57
|
-
init(
|
|
58
|
-
config: Required<
|
|
60
|
+
init(data: {
|
|
61
|
+
config: Required<PopsPanelConfig>;
|
|
59
62
|
$el: {
|
|
60
63
|
$pops: HTMLElement;
|
|
61
64
|
$content: HTMLElement;
|
|
@@ -102,7 +105,7 @@ export declare const PanelHandlerComponents: () => {
|
|
|
102
105
|
* @param $el 元素
|
|
103
106
|
* @param className
|
|
104
107
|
*/
|
|
105
|
-
setElementClassName($el: HTMLElement, className?:
|
|
108
|
+
setElementClassName($el: HTMLElement, className?: PopsPanelGeneralConfig<any>["className"]): void;
|
|
106
109
|
/**
|
|
107
110
|
* 创建底部项元素<li>
|
|
108
111
|
* @param bottomItemConfig 配置
|
|
@@ -122,84 +125,85 @@ export declare const PanelHandlerComponents: () => {
|
|
|
122
125
|
/**
|
|
123
126
|
* type ==> switch
|
|
124
127
|
* 创建中间容器的元素<li>
|
|
125
|
-
* @param
|
|
128
|
+
* @param viewConfig
|
|
126
129
|
*/
|
|
127
|
-
createSectionContainerItem_switch(
|
|
130
|
+
createSectionContainerItem_switch(viewConfig: PopsPanelSwitchConfig): HTMLLIElement;
|
|
128
131
|
/**
|
|
129
132
|
* type ==> slider
|
|
130
133
|
* 获取中间容器的元素<li>
|
|
131
|
-
* @param
|
|
134
|
+
* @param viewConfig
|
|
132
135
|
*/
|
|
133
|
-
createSectionContainerItem_slider(
|
|
136
|
+
createSectionContainerItem_slider(viewConfig: PopsPanelSliderConfig): HTMLLIElement;
|
|
134
137
|
/**
|
|
135
138
|
* type ==> slider
|
|
136
139
|
* 获取中间容器的元素<li>
|
|
137
|
-
* @param
|
|
140
|
+
* @param viewConfig
|
|
138
141
|
*/
|
|
139
|
-
createSectionContainerItem_slider_new(
|
|
142
|
+
createSectionContainerItem_slider_new(viewConfig: PopsPanelSliderConfig): HTMLLIElement;
|
|
140
143
|
/**
|
|
141
144
|
* type ==> input
|
|
142
145
|
* 获取中间容器的元素<li>
|
|
143
|
-
* @param
|
|
146
|
+
* @param viewConfig
|
|
144
147
|
*/
|
|
145
|
-
createSectionContainerItem_input(
|
|
148
|
+
createSectionContainerItem_input(viewConfig: PopsPanelInputConfig): HTMLLIElement;
|
|
146
149
|
/**
|
|
147
150
|
* type ==> textarea
|
|
148
151
|
* 获取中间容器的元素<li>
|
|
149
|
-
* @param
|
|
152
|
+
* @param viewConfig
|
|
150
153
|
*/
|
|
151
|
-
createSectionContainerItem_textarea(
|
|
154
|
+
createSectionContainerItem_textarea(viewConfig: PopsPanelTextAreaConfig): HTMLLIElement;
|
|
152
155
|
/**
|
|
153
156
|
* type ==> select
|
|
154
157
|
* 获取中间容器的元素<li>
|
|
155
|
-
* @param
|
|
158
|
+
* @param viewConfig
|
|
156
159
|
*/
|
|
157
|
-
createSectionContainerItem_select(
|
|
160
|
+
createSectionContainerItem_select(viewConfig: PopsPanelSelectConfig<any>): HTMLLIElement;
|
|
158
161
|
/**
|
|
159
162
|
* type ==> select-multiple
|
|
160
163
|
* 获取中间容器的元素<li>
|
|
161
|
-
* @param
|
|
164
|
+
* @param viewConfig
|
|
162
165
|
*/
|
|
163
|
-
|
|
166
|
+
createSectionContainerItem_select_multiple(viewConfig: PopsPanelSelectMultipleConfig<any>): HTMLLIElement;
|
|
164
167
|
/**
|
|
165
168
|
* type ==> button
|
|
166
169
|
* 获取中间容器的元素<li>
|
|
167
|
-
* @param
|
|
170
|
+
* @param viewConfig
|
|
168
171
|
*/
|
|
169
|
-
createSectionContainerItem_button(
|
|
172
|
+
createSectionContainerItem_button(viewConfig: PopsPanelButtonConfig): HTMLLIElement;
|
|
170
173
|
/**
|
|
171
174
|
* type ==> deepMenu
|
|
172
175
|
* 获取深层容器的元素<li>
|
|
173
|
-
* @param
|
|
176
|
+
* @param viewConfig
|
|
174
177
|
*/
|
|
175
|
-
createSectionContainerItem_deepMenu(
|
|
178
|
+
createSectionContainerItem_deepMenu(viewConfig: PopsPanelDeepViewConfig): HTMLLIElement;
|
|
176
179
|
/**
|
|
177
180
|
* type ===> own
|
|
178
181
|
* 获取中间容器的元素<li>
|
|
179
|
-
* @param
|
|
182
|
+
* @param viewConfig
|
|
180
183
|
*/
|
|
181
|
-
createSectionContainerItem_own(
|
|
184
|
+
createSectionContainerItem_own(viewConfig: PopsPanelOwnConfig): HTMLLIElement;
|
|
182
185
|
/**
|
|
183
186
|
* 获取中间容器的元素<li>
|
|
184
|
-
* @param
|
|
187
|
+
* @param viewConfig 视图配置
|
|
185
188
|
*/
|
|
186
|
-
createSectionContainerItem(
|
|
189
|
+
createSectionContainerItem(viewConfig: PopsPanelViewConfig): HTMLLIElement | undefined;
|
|
187
190
|
/**
|
|
188
191
|
* 生成配置项forms
|
|
189
192
|
* 生成配置每一项的元素
|
|
190
|
-
* @param
|
|
193
|
+
* @param viewConfig
|
|
191
194
|
*/
|
|
192
|
-
createSectionContainerItem_forms(
|
|
195
|
+
createSectionContainerItem_forms(viewConfig: PopsPanelContentConfig | PopsPanelContainerConfig): void;
|
|
193
196
|
/**
|
|
194
197
|
* 主动触发触发渲染右侧容器的事件
|
|
198
|
+
* @param $container 容器
|
|
195
199
|
*/
|
|
196
200
|
triggerRenderRightContainer($container: HTMLElement): void;
|
|
197
201
|
/**
|
|
198
202
|
*
|
|
199
|
-
* @param
|
|
203
|
+
* @param viewConfig
|
|
200
204
|
* @param containerOptions
|
|
201
205
|
*/
|
|
202
|
-
uListContainerAddItem(
|
|
206
|
+
uListContainerAddItem(viewConfig: PopsPanelViewConfig, containerOptions: Omit<PopsPanelRightAsideContainerConfig, "target">): void;
|
|
203
207
|
/**
|
|
204
208
|
* 为左侧容器元素添加点击事件
|
|
205
209
|
* @param $asideItem 左侧的容器<li>元素
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsPanelConfig, PopsPanelEventType } from "./types";
|
|
2
2
|
import type { PopsType } from "../../types/main";
|
|
3
3
|
export declare const PopsPanel: {
|
|
4
|
-
init(
|
|
4
|
+
init(__config__: PopsPanelConfig): {
|
|
5
5
|
addEventListener: <K extends keyof PopsPanelEventType>(event: K, listener: (evt: CustomEvent<PopsPanelEventType[K]>) => void, options?: boolean | EventListenerOptions) => void;
|
|
6
6
|
removeEventListener: <K extends keyof PopsPanelEventType>(event: K, listener: (evt: CustomEvent<PopsPanelEventType[K]>) => void, options?: boolean | EventListenerOptions) => void;
|
|
7
7
|
close: () => Promise<void>;
|
|
8
8
|
hide: () => Promise<void>;
|
|
9
9
|
show: () => Promise<void>;
|
|
10
|
-
guid: string;
|
|
11
10
|
$shadowContainer: HTMLDivElement;
|
|
12
11
|
$shadowRoot: ShadowRoot | HTMLElement;
|
|
13
12
|
$el: HTMLDivElement;
|
|
@@ -15,5 +14,6 @@ export declare const PopsPanel: {
|
|
|
15
14
|
$pops: HTMLDivElement;
|
|
16
15
|
$mask?: HTMLDivElement | undefined;
|
|
17
16
|
mode: PopsType;
|
|
17
|
+
guid: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
2
2
|
import type { PopsButtonStyleType } from "../../../types/button";
|
|
3
3
|
import type { PopsIconType } from "../../../types/icon";
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 button
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface PopsPanelButtonConfig extends PopsPanelGeneralConfig<PopsPanelButtonConfig> {
|
|
8
|
+
/**
|
|
9
|
+
* 类型
|
|
10
|
+
*/
|
|
11
|
+
type: "button";
|
|
8
12
|
/**
|
|
9
13
|
* 显示在左边的文字
|
|
10
14
|
*/
|
|
@@ -13,12 +17,9 @@ export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanel
|
|
|
13
17
|
* (可选)左边的文字下面的描述
|
|
14
18
|
*/
|
|
15
19
|
description?: string;
|
|
16
|
-
/**
|
|
17
|
-
* 类型
|
|
18
|
-
*/
|
|
19
|
-
type: "button";
|
|
20
20
|
/**
|
|
21
21
|
* (可选)是否禁用
|
|
22
|
+
* @default false
|
|
22
23
|
*/
|
|
23
24
|
disable?: boolean;
|
|
24
25
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PopsPanelContainerConfig } from "./components-container";
|
|
2
|
+
import type { PopsPanelViewConfig } from ".";
|
|
3
3
|
/**
|
|
4
4
|
* 右侧容器的配置
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface PopsPanelRightAsideContainerConfig {
|
|
7
7
|
/** 当前的<li>元素 */
|
|
8
8
|
target: HTMLLIElement | undefined;
|
|
9
9
|
/** 当前的<li>元素的父<ul>元素 */
|
|
@@ -18,7 +18,7 @@ export interface PopsPanelRightAsideContainerOptions {
|
|
|
18
18
|
/**
|
|
19
19
|
* 通用配置
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface PopsPanelGeneralConfig<T extends PopsPanelViewConfig | PopsPanelContainerConfig> {
|
|
22
22
|
/**
|
|
23
23
|
* (可选)元素的className,值为空的话就不设置
|
|
24
24
|
* @default ""
|
|
@@ -42,11 +42,11 @@ export interface PopsPanelCommonDetails<T extends PopsPanelFormsTotalDetails | P
|
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* 在添加到<ul>元素后触发该回调
|
|
45
|
-
* @param
|
|
45
|
+
* @param viewConfig 配置
|
|
46
46
|
* @param container 右侧容器的元素
|
|
47
47
|
* @example
|
|
48
48
|
* // 例如在type为own时
|
|
49
|
-
* afterAddToUListCallBack(
|
|
49
|
+
* afterAddToUListCallBack(viewConfig, container) {
|
|
50
50
|
* DOMUtils.on(
|
|
51
51
|
container.formHeaderDivElement.querySelector(
|
|
52
52
|
"a"
|
|
@@ -66,5 +66,5 @@ export interface PopsPanelCommonDetails<T extends PopsPanelFormsTotalDetails | P
|
|
|
66
66
|
* // 例如在type为forms时
|
|
67
67
|
* container内只有container.ulElement这个属性
|
|
68
68
|
*/
|
|
69
|
-
afterAddToUListCallBack?: (
|
|
69
|
+
afterAddToUListCallBack?: (viewConfig: T, container: PopsPanelRightAsideContainerConfig) => void;
|
|
70
70
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
2
|
+
import type { PopsPanelViewConfig } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* pops.panel的 container
|
|
5
|
+
*/
|
|
6
|
+
export interface PopsPanelContainerConfig extends PopsPanelGeneralConfig<PopsPanelContainerConfig> {
|
|
7
|
+
/**
|
|
8
|
+
* 类型
|
|
9
|
+
*/
|
|
10
|
+
type: "container";
|
|
11
|
+
/**
|
|
12
|
+
* 显示在左边的文字
|
|
13
|
+
*/
|
|
14
|
+
text: string;
|
|
15
|
+
/**
|
|
16
|
+
* 是否进行折叠
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
isFold?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 子配置
|
|
22
|
+
*/
|
|
23
|
+
views: PopsPanelViewConfig[];
|
|
24
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { PopsPanelViewConfig } from ".";
|
|
2
|
+
import type { PopsPanelContainerConfig } from "./components-container";
|
|
3
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
4
4
|
/**
|
|
5
|
-
* pops.panel的
|
|
5
|
+
* pops.panel的 深层视图的配置
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface PopsPanelDeepViewConfig extends PopsPanelGeneralConfig<PopsPanelDeepViewConfig> {
|
|
8
8
|
/**
|
|
9
9
|
* 类型
|
|
10
10
|
*/
|
|
@@ -32,25 +32,25 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails<PopsPan
|
|
|
32
32
|
* + true 表示阻止进入深层菜单
|
|
33
33
|
* + false (默认)表示允许进入深层菜单
|
|
34
34
|
*/
|
|
35
|
-
clickCallBack?: (event: MouseEvent | PointerEvent,
|
|
35
|
+
clickCallBack?: (event: MouseEvent | PointerEvent, viewConfig: PopsPanelDeepViewConfig) => boolean | void | Promise<boolean | void>;
|
|
36
36
|
/**
|
|
37
37
|
* 进入深层菜单后触发的回调
|
|
38
|
-
* @param
|
|
38
|
+
* @param viewConfig
|
|
39
39
|
*/
|
|
40
|
-
afterEnterDeepMenuCallBack?: (
|
|
40
|
+
afterEnterDeepMenuCallBack?: (viewConfig: PopsPanelDeepViewConfig, container: {
|
|
41
41
|
/** 右侧的总容器 */
|
|
42
|
-
sectionContainer: HTMLElement;
|
|
42
|
+
$sectionContainer: HTMLElement;
|
|
43
43
|
/** 右侧的总容器的标题头容器 */
|
|
44
|
-
sectionContainerHeaderContainer: HTMLUListElement;
|
|
44
|
+
$sectionContainerHeaderContainer: HTMLUListElement;
|
|
45
45
|
/** 右侧的总容器的标题头 */
|
|
46
|
-
sectionContainerHeader: HTMLLIElement;
|
|
46
|
+
$sectionContainerHeader: HTMLLIElement;
|
|
47
47
|
/** 右侧的内容容器 */
|
|
48
|
-
sectionBodyContainer: HTMLUListElement;
|
|
48
|
+
$sectionBodyContainer: HTMLUListElement;
|
|
49
49
|
}) => void;
|
|
50
50
|
/**
|
|
51
51
|
* 菜单配置
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
views?: (PopsPanelContainerConfig | PopsPanelViewConfig)[];
|
|
54
54
|
/**
|
|
55
55
|
* (可选)头部的标题文字,没有的话默认是text
|
|
56
56
|
*/
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 input
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface PopsPanelInputConfig extends PopsPanelGeneralConfig<PopsPanelInputConfig> {
|
|
6
|
+
/**
|
|
7
|
+
* 类型
|
|
8
|
+
*/
|
|
9
|
+
type: "input";
|
|
6
10
|
/**
|
|
7
11
|
* 显示在左边的文字
|
|
8
12
|
*/
|
|
@@ -12,10 +16,6 @@ export interface PopsPanelInputDetails extends PopsPanelCommonDetails<PopsPanelI
|
|
|
12
16
|
* @default ""
|
|
13
17
|
*/
|
|
14
18
|
description?: string;
|
|
15
|
-
/**
|
|
16
|
-
* 类型
|
|
17
|
-
*/
|
|
18
|
-
type: "input";
|
|
19
19
|
/**
|
|
20
20
|
* (可选)是否禁用
|
|
21
21
|
* @default false
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 own
|
|
4
4
|
* 自定义的
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface PopsPanelOwnConfig extends PopsPanelGeneralConfig<PopsPanelOwnConfig> {
|
|
7
7
|
/**
|
|
8
8
|
* 类型
|
|
9
9
|
*/
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
2
|
+
import type { PopsPanelContainerConfig } from "./components-container";
|
|
3
|
+
import type { PopsPanelViewConfig } from ".";
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 select
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface PopsPanelSelectConfig<T = any> extends PopsPanelGeneralConfig<PopsPanelSelectConfig> {
|
|
8
|
+
/**
|
|
9
|
+
* 类型
|
|
10
|
+
*/
|
|
11
|
+
type: "select";
|
|
8
12
|
/**
|
|
9
13
|
* 显示在左边的文字
|
|
10
14
|
*/
|
|
@@ -14,10 +18,6 @@ export interface PopsPanelSelectDetails<T = any> extends PopsPanelCommonDetails<
|
|
|
14
18
|
* @default ""
|
|
15
19
|
*/
|
|
16
20
|
description?: string;
|
|
17
|
-
/**
|
|
18
|
-
* 类型
|
|
19
|
-
*/
|
|
20
|
-
type: "select";
|
|
21
21
|
/**
|
|
22
22
|
* (可选)是否禁用
|
|
23
23
|
* @default false
|
|
@@ -62,6 +62,6 @@ export interface PopsPanelSelectDetails<T = any> extends PopsPanelCommonDetails<
|
|
|
62
62
|
/**
|
|
63
63
|
* 子配置,跟随切换改变
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
views?: (PopsPanelContainerConfig | PopsPanelViewConfig)[] | (() => (PopsPanelContainerConfig | PopsPanelViewConfig)[]);
|
|
66
66
|
}[];
|
|
67
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PopsAlertConfig } from "../../alert/types";
|
|
2
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
3
3
|
export interface PopsPanelSelectMultipleDataOption<T> {
|
|
4
4
|
/**
|
|
5
5
|
* 真正的值
|
|
@@ -31,7 +31,11 @@ export interface PopsPanelSelectMultipleDataOption<T> {
|
|
|
31
31
|
/**
|
|
32
32
|
* pops.panel的 select
|
|
33
33
|
*/
|
|
34
|
-
export interface
|
|
34
|
+
export interface PopsPanelSelectMultipleConfig<T = any> extends PopsPanelGeneralConfig<PopsPanelSelectMultipleConfig> {
|
|
35
|
+
/**
|
|
36
|
+
* 类型
|
|
37
|
+
*/
|
|
38
|
+
type: "select-multiple";
|
|
35
39
|
/**
|
|
36
40
|
* 显示在左边的文字
|
|
37
41
|
*/
|
|
@@ -40,10 +44,6 @@ export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommon
|
|
|
40
44
|
* (可选)左边的文字下面的描述
|
|
41
45
|
*/
|
|
42
46
|
description?: string;
|
|
43
|
-
/**
|
|
44
|
-
* 类型
|
|
45
|
-
*/
|
|
46
|
-
type: "select-multiple";
|
|
47
47
|
/**
|
|
48
48
|
* (可选)是否禁用
|
|
49
49
|
*/
|
|
@@ -59,7 +59,7 @@ export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommon
|
|
|
59
59
|
/**
|
|
60
60
|
* 弹出的下拉列表弹窗的配置
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
selectConfirmDialogConfig?: Partial<PopsAlertConfig>;
|
|
63
63
|
/**
|
|
64
64
|
* 选择器的值改变触发的回调函数
|
|
65
65
|
* @param event 事件
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsPanelGeneralConfig } from "./components-common";
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 slider
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface PopsPanelSliderConfig extends PopsPanelGeneralConfig<PopsPanelSliderConfig> {
|
|
6
|
+
/**
|
|
7
|
+
* 类型
|
|
8
|
+
* @default "slider"
|
|
9
|
+
*/
|
|
10
|
+
type: "slider";
|
|
6
11
|
/**
|
|
7
12
|
* 显示在左边的文字
|
|
8
13
|
*/
|
|
@@ -12,11 +17,6 @@ export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanel
|
|
|
12
17
|
* @default ""
|
|
13
18
|
*/
|
|
14
19
|
description?: string;
|
|
15
|
-
/**
|
|
16
|
-
* 类型
|
|
17
|
-
* @default "slider"
|
|
18
|
-
*/
|
|
19
|
-
type: "slider";
|
|
20
20
|
/**
|
|
21
21
|
* (可选)是否禁用
|
|
22
22
|
* @default false
|