@whitesev/pops 2.1.13 → 2.2.1
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 +120 -110
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +120 -110
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +120 -110
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +120 -110
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +120 -110
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +120 -110
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +16 -16
- package/dist/types/src/PopsInst.d.ts +8 -0
- package/dist/types/src/components/panel/index.d.ts +1 -1
- package/dist/types/src/components/panel/types/components-deepMenu.d.ts +1 -1
- package/dist/types/src/handler/PopsElementHandler.d.ts +2 -2
- package/dist/types/src/handler/PopsHandler.d.ts +6 -6
- package/dist/types/src/types/button.d.ts +2 -2
- package/dist/types/src/types/event.d.ts +3 -3
- package/dist/types/src/types/{layer.d.ts → inst.d.ts} +7 -5
- package/dist/types/src/types/main.d.ts +8 -33
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +10 -10
- package/package.json +1 -1
- package/src/Pops.ts +3 -3
- package/src/PopsInst.ts +21 -0
- package/src/components/alert/index.ts +2 -2
- package/src/components/iframe/index.ts +2 -2
- package/src/components/panel/handlerComponents.ts +12 -8
- package/src/components/panel/index.css +18 -5
- package/src/components/panel/types/components-deepMenu.ts +1 -1
- package/src/components/rightClickMenu/index.ts +2 -2
- package/src/css/scrollbar.css +9 -5
- package/src/handler/PopsElementHandler.ts +2 -2
- package/src/handler/PopsHandler.ts +30 -30
- package/src/types/button.d.ts +2 -2
- package/src/types/event.d.ts +3 -3
- package/src/types/{layer.d.ts → inst.d.ts} +7 -5
- package/src/types/main.d.ts +8 -33
- package/src/utils/PopsInstanceUtils.ts +84 -81
- package/dist/types/src/PopsLayer.d.ts +0 -5
- package/src/PopsLayer.ts +0 -18
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -68,17 +68,17 @@ declare class Pops {
|
|
|
68
68
|
[key: string]: CSSKeyframesRule;
|
|
69
69
|
};
|
|
70
70
|
/** 存储已创建的元素 */
|
|
71
|
-
|
|
72
|
-
iframe: import("./types/
|
|
73
|
-
loading: import("./types/
|
|
74
|
-
folder: import("./types/
|
|
75
|
-
alert: import("./types/
|
|
76
|
-
confirm: import("./types/
|
|
77
|
-
prompt: import("./types/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
rightClickMenu: import("./types/
|
|
71
|
+
instData: {
|
|
72
|
+
iframe: import("./types/inst").PopsInstCommonConfig[];
|
|
73
|
+
loading: import("./types/inst").PopsInstCommonConfig[];
|
|
74
|
+
folder: import("./types/inst").PopsInstCommonConfig[];
|
|
75
|
+
alert: import("./types/inst").PopsInstCommonConfig[];
|
|
76
|
+
confirm: import("./types/inst").PopsInstCommonConfig[];
|
|
77
|
+
prompt: import("./types/inst").PopsInstCommonConfig[];
|
|
78
|
+
tooltip: import("./types/inst").PopsInstCommonConfig[];
|
|
79
|
+
drawer: import("./types/inst").PopsInstCommonConfig[];
|
|
80
|
+
panel: import("./types/inst").PopsInstCommonConfig[];
|
|
81
|
+
rightClickMenu: import("./types/inst").PopsInstCommonConfig[];
|
|
82
82
|
};
|
|
83
83
|
/** 禁止滚动 */
|
|
84
84
|
forbiddenScroll: {
|
|
@@ -189,10 +189,10 @@ declare class Pops {
|
|
|
189
189
|
isOverMaxZIndex: boolean;
|
|
190
190
|
};
|
|
191
191
|
getMaxZIndex(deviation?: number): number;
|
|
192
|
-
removeInstance(
|
|
193
|
-
hide(popsType: import("./types/main").
|
|
194
|
-
show(popsType: import("./types/main").
|
|
195
|
-
close(popsType: string,
|
|
192
|
+
removeInstance(instConfigList: import("./types/inst").PopsInstCommonConfig[][], guid: string, isAll?: boolean): import("./types/inst").PopsInstCommonConfig[][];
|
|
193
|
+
hide(popsType: import("./types/main").PopsInstStoreType, instConfigList: import("./types/inst").PopsInstCommonConfig[], guid: string, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails, animElement: HTMLElement, maskElement: HTMLElement): Promise<void>;
|
|
194
|
+
show(popsType: import("./types/main").PopsInstStoreType, instConfigList: import("./types/inst").PopsInstCommonConfig[], guid: string, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails, animElement: HTMLElement, maskElement?: HTMLElement): Promise<void>;
|
|
195
|
+
close(popsType: string, instConfigList: import("./types/inst").PopsInstCommonConfig[], guid: string, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails, animElement: HTMLElement): Promise<void>;
|
|
196
196
|
drag(moveElement: HTMLElement, options: {
|
|
197
197
|
dragElement: HTMLElement;
|
|
198
198
|
limit: boolean;
|
|
@@ -409,7 +409,7 @@ declare class Pops {
|
|
|
409
409
|
animElement: HTMLDivElement;
|
|
410
410
|
popsElement: HTMLDivElement;
|
|
411
411
|
maskElement?: HTMLDivElement | undefined;
|
|
412
|
-
mode: import("./types/main").
|
|
412
|
+
mode: import("./types/main").PopsType;
|
|
413
413
|
};
|
|
414
414
|
/**
|
|
415
415
|
* 右键菜单
|
|
@@ -61,7 +61,7 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails<PopsPan
|
|
|
61
61
|
/** 右侧的总容器的标题头容器 */
|
|
62
62
|
sectionContainerHeaderContainer: HTMLUListElement;
|
|
63
63
|
/** 右侧的总容器的标题头 */
|
|
64
|
-
sectionContainerHeader:
|
|
64
|
+
sectionContainerHeader: HTMLLIElement;
|
|
65
65
|
/** 右侧的内容容器 */
|
|
66
66
|
sectionBodyContainer: HTMLUListElement;
|
|
67
67
|
}) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PopsSupportAnim, PopsSupportBottomBtn, PopsSupportContent, PopsSupportHeaderTitle,
|
|
1
|
+
import type { PopsSupportAnim, PopsSupportBottomBtn, PopsSupportContent, PopsSupportHeaderTitle, PopsSupportAnimType, PopsTypeSupportBottomBtn, PopsTypeSupportContent, PopsTypeSupportHeaderTitle } from "../types/main";
|
|
2
2
|
export declare const PopsElementHandler: {
|
|
3
3
|
/**
|
|
4
4
|
* 获取遮罩层HTML
|
|
@@ -16,7 +16,7 @@ export declare const PopsElementHandler: {
|
|
|
16
16
|
* @param bottomBtnHTML
|
|
17
17
|
* @param zIndex
|
|
18
18
|
*/
|
|
19
|
-
getAnimHTML(guid: string, type:
|
|
19
|
+
getAnimHTML(guid: string, type: PopsSupportAnimType, config: PopsSupportAnim[keyof PopsSupportAnim], html: string | undefined, bottomBtnHTML: string | undefined, zIndex: number): string;
|
|
20
20
|
/**
|
|
21
21
|
* 获取顶部按钮层HTML
|
|
22
22
|
* @param type
|
|
@@ -8,8 +8,8 @@ import type { PopsPanelDetails } from "../components/panel/types";
|
|
|
8
8
|
import type { PopsPromptDetails } from "../components/prompt/types/index";
|
|
9
9
|
import type { PopsCommonConfig } from "../types/components";
|
|
10
10
|
import { PopsEventDetails, PopsHandlerEventDetails } from "../types/event";
|
|
11
|
-
import {
|
|
12
|
-
import type {
|
|
11
|
+
import { PopsInstCommonConfig } from "../types/inst";
|
|
12
|
+
import type { PopsDetails, PopsInstStoreType, PopsType, PopsSupportAnimType } from "../types/main";
|
|
13
13
|
export declare const PopsHandler: {
|
|
14
14
|
/**
|
|
15
15
|
* 创建shadow
|
|
@@ -50,7 +50,7 @@ export declare const PopsHandler: {
|
|
|
50
50
|
* @param animElement
|
|
51
51
|
* @param type
|
|
52
52
|
*/
|
|
53
|
-
handleQueryElement(animElement: HTMLDivElement, type:
|
|
53
|
+
handleQueryElement(animElement: HTMLDivElement, type: PopsSupportAnimType): {
|
|
54
54
|
/**
|
|
55
55
|
* 主元素
|
|
56
56
|
*/
|
|
@@ -163,7 +163,7 @@ export declare const PopsHandler: {
|
|
|
163
163
|
* @param maskElement 遮罩层
|
|
164
164
|
* @param config 当前配置
|
|
165
165
|
*/
|
|
166
|
-
handleEventDetails(guid: string, $shadowContainer: HTMLDivElement, $shadowRoot: ShadowRoot | HTMLElement, mode:
|
|
166
|
+
handleEventDetails(guid: string, $shadowContainer: HTMLDivElement, $shadowRoot: ShadowRoot | HTMLElement, mode: PopsInstStoreType, animElement: HTMLDivElement, popsElement: HTMLDivElement, maskElement: HTMLDivElement, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails): PopsEventDetails;
|
|
167
167
|
/**
|
|
168
168
|
* 获取loading的事件配置
|
|
169
169
|
* @param guid
|
|
@@ -217,11 +217,11 @@ export declare const PopsHandler: {
|
|
|
217
217
|
* @param type 当前弹窗类型
|
|
218
218
|
* @param config 配置
|
|
219
219
|
*/
|
|
220
|
-
handleOnly<T extends Required<
|
|
220
|
+
handleOnly<T extends Required<PopsDetails[keyof PopsDetails]>>(type: PopsType, config: T): T;
|
|
221
221
|
/**
|
|
222
222
|
* 处理把已创建的元素保存到内部环境中
|
|
223
223
|
* @param type 当前弹窗类型
|
|
224
224
|
* @param value
|
|
225
225
|
*/
|
|
226
|
-
handlePush(type:
|
|
226
|
+
handlePush(type: PopsInstStoreType, value: PopsInstCommonConfig): void;
|
|
227
227
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PopsEventDetails, PopsHandlerEventDetails } from "./event";
|
|
2
2
|
import type { PopsIconType } from "./icon";
|
|
3
|
-
import type {
|
|
3
|
+
import type { PopsType } from "./main";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 按钮类型
|
|
@@ -51,7 +51,7 @@ export interface PopsBtnCallBackEvent {
|
|
|
51
51
|
/**
|
|
52
52
|
* 调用的方法
|
|
53
53
|
*/
|
|
54
|
-
mode:
|
|
54
|
+
mode: PopsType;
|
|
55
55
|
/**
|
|
56
56
|
* 唯一id
|
|
57
57
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PopsIframeDetails } from "../components/iframe/types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PopsType } from "./main";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 事件配置
|
|
@@ -12,7 +12,7 @@ export interface PopsIframeEventDetails {
|
|
|
12
12
|
/**
|
|
13
13
|
* 当前弹窗类型
|
|
14
14
|
*/
|
|
15
|
-
mode:
|
|
15
|
+
mode: PopsType;
|
|
16
16
|
/**
|
|
17
17
|
* 动画层
|
|
18
18
|
*/
|
|
@@ -47,7 +47,7 @@ export interface PopsEventDetails {
|
|
|
47
47
|
/** 遮罩层 */
|
|
48
48
|
maskElement?: HTMLDivElement;
|
|
49
49
|
/** 当前弹窗类型 */
|
|
50
|
-
mode:
|
|
50
|
+
mode: PopsType;
|
|
51
51
|
guid: string;
|
|
52
52
|
close: () => Promise<void>;
|
|
53
53
|
hide: () => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* config
|
|
2
|
+
* config实例配置
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface PopsInstConfig {
|
|
5
5
|
/** 固定id */
|
|
6
6
|
guid: string;
|
|
7
7
|
/** 动画元素 */
|
|
@@ -11,12 +11,14 @@ export interface PopsLayerConfig {
|
|
|
11
11
|
/** 遮罩层元素 */
|
|
12
12
|
maskElement?: HTMLDivElement;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* config实例通用配置
|
|
16
|
+
*/
|
|
17
|
+
export interface PopsInstCommonConfig extends PopsInstConfig {
|
|
16
18
|
/** shadow容器 */
|
|
17
19
|
$shadowContainer: HTMLDivElement;
|
|
18
20
|
/** shadow容器的shandowRoot */
|
|
19
21
|
$shadowRoot: ShadowRoot | HTMLElement;
|
|
20
22
|
/** 移除实例前的回调函数 */
|
|
21
|
-
beforeRemoveCallBack?: (
|
|
23
|
+
beforeRemoveCallBack?: (instCommonConfig: PopsInstCommonConfig) => void;
|
|
22
24
|
}
|
|
@@ -22,7 +22,7 @@ export interface PopsUtilsOwnObject<V extends any> {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/** pops的所有类型配置 10个 */
|
|
25
|
-
export interface
|
|
25
|
+
export interface PopsDetails {
|
|
26
26
|
alert: PopsAlertDetails;
|
|
27
27
|
confirm: PopsConfirmDetails;
|
|
28
28
|
prompt: PopsPromptDetails;
|
|
@@ -35,42 +35,17 @@ export interface PopsAllDetails {
|
|
|
35
35
|
rightClickMenu: PopsRightClickMenuDetails;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/** pops的类型配置 8个 */
|
|
39
|
-
export interface PopsTypeDetails {
|
|
40
|
-
alert: PopsAlertDetails;
|
|
41
|
-
confirm: PopsConfirmDetails;
|
|
42
|
-
prompt: PopsPromptDetails;
|
|
43
|
-
loading: PopsLoadingDetails;
|
|
44
|
-
iframe: PopsIframeDetails;
|
|
45
|
-
// tooltip: PopsToolTipDetails;
|
|
46
|
-
drawer: PopsDrawerDetails;
|
|
47
|
-
folder: PopsFolderDetails;
|
|
48
|
-
panel: PopsPanelDetails;
|
|
49
|
-
// rightClickMenu: PopsRightClickMenuDetails;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** pops的类型 8个 */
|
|
53
|
-
export type PopsType = keyof PopsTypeDetails;
|
|
54
|
-
|
|
55
38
|
/** pops所有的类型 10个 */
|
|
56
|
-
export type
|
|
39
|
+
export type PopsType = keyof PopsDetails;
|
|
57
40
|
|
|
58
|
-
/** 存储实例的类型
|
|
59
|
-
export type
|
|
41
|
+
/** 存储实例的类型 10个 */
|
|
42
|
+
export type PopsInstStoreType = PopsType;
|
|
43
|
+
|
|
44
|
+
/** pops弹窗支持动画元素的配置 8个 */
|
|
45
|
+
export type PopsSupportAnim = Omit<PopsDetails, "tooltip" | "rightClickMenu">;
|
|
60
46
|
|
|
61
|
-
/** pops弹窗支持动画元素的配置 */
|
|
62
|
-
export interface PopsSupportAnim {
|
|
63
|
-
alert: PopsAlertDetails;
|
|
64
|
-
confirm: PopsConfirmDetails;
|
|
65
|
-
prompt: PopsPromptDetails;
|
|
66
|
-
loading: PopsLoadingDetails;
|
|
67
|
-
iframe: PopsIframeDetails;
|
|
68
|
-
drawer: PopsDrawerDetails;
|
|
69
|
-
folder: PopsFolderDetails;
|
|
70
|
-
panel: PopsPanelDetails;
|
|
71
|
-
}
|
|
72
47
|
/** pops弹窗支持动画元素的类型 */
|
|
73
|
-
export type
|
|
48
|
+
export type PopsSupportAnimType = keyof PopsSupportAnim;
|
|
74
49
|
|
|
75
50
|
/** pops弹窗支持标题栏的配置 */
|
|
76
51
|
export interface PopsSupportHeaderTitle {
|
|
@@ -6,8 +6,8 @@ import type { PopsIframeDetails } from "../components/iframe/types";
|
|
|
6
6
|
import type { PopsLoadingDetails } from "../components/loading/types";
|
|
7
7
|
import type { PopsPanelDetails } from "../components/panel/types";
|
|
8
8
|
import type { PopsPromptDetails } from "../components/prompt/types/index";
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
9
|
+
import type { PopsInstCommonConfig } from "../types/inst";
|
|
10
|
+
import type { PopsInstStoreType } from "../types/main";
|
|
11
11
|
export declare const PopsInstanceUtils: {
|
|
12
12
|
/**
|
|
13
13
|
* 获取页面中最大的z-index的元素信息
|
|
@@ -44,40 +44,40 @@ export declare const PopsInstanceUtils: {
|
|
|
44
44
|
getMaxZIndex(deviation?: number): number;
|
|
45
45
|
/**
|
|
46
46
|
* 删除配置中对应的对象
|
|
47
|
-
* @param
|
|
47
|
+
* @param instConfigList 配置实例列表
|
|
48
48
|
* @param guid 唯一标识
|
|
49
49
|
* @param isAll 是否全部删除
|
|
50
50
|
*/
|
|
51
|
-
removeInstance(
|
|
51
|
+
removeInstance(instConfigList: PopsInstCommonConfig[][], guid: string, isAll?: boolean): PopsInstCommonConfig[][];
|
|
52
52
|
/**
|
|
53
53
|
* 隐藏
|
|
54
54
|
* @param popsType
|
|
55
|
-
* @param
|
|
55
|
+
* @param instConfigList
|
|
56
56
|
* @param guid
|
|
57
57
|
* @param config
|
|
58
58
|
* @param animElement
|
|
59
59
|
* @param maskElement
|
|
60
60
|
*/
|
|
61
|
-
hide(popsType:
|
|
61
|
+
hide(popsType: PopsInstStoreType, instConfigList: PopsInstCommonConfig[], guid: string, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails, animElement: HTMLElement, maskElement: HTMLElement): Promise<void>;
|
|
62
62
|
/**
|
|
63
63
|
* 显示
|
|
64
64
|
* @param popsType
|
|
65
|
-
* @param
|
|
65
|
+
* @param instConfigList
|
|
66
66
|
* @param guid
|
|
67
67
|
* @param config
|
|
68
68
|
* @param animElement
|
|
69
69
|
* @param maskElement
|
|
70
70
|
*/
|
|
71
|
-
show(popsType:
|
|
71
|
+
show(popsType: PopsInstStoreType, instConfigList: PopsInstCommonConfig[], guid: string, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails, animElement: HTMLElement, maskElement?: HTMLElement): Promise<void>;
|
|
72
72
|
/**
|
|
73
73
|
* 关闭
|
|
74
74
|
* @param popsType
|
|
75
|
-
* @param
|
|
75
|
+
* @param instConfigList
|
|
76
76
|
* @param guid
|
|
77
77
|
* @param config
|
|
78
78
|
* @param animElement
|
|
79
79
|
*/
|
|
80
|
-
close(popsType: string,
|
|
80
|
+
close(popsType: string, instConfigList: PopsInstCommonConfig[], guid: string, config: PopsAlertDetails | PopsDrawerDetails | PopsPromptDetails | PopsConfirmDetails | PopsIframeDetails | PopsLoadingDetails | PopsPanelDetails | PopsFolderDetails, animElement: HTMLElement): Promise<void>;
|
|
81
81
|
/**
|
|
82
82
|
* 拖拽元素
|
|
83
83
|
* 说明:
|
package/package.json
CHANGED
package/src/Pops.ts
CHANGED
|
@@ -29,21 +29,21 @@ import { GlobalConfig } from "./GlobalConfig";
|
|
|
29
29
|
import { PopsTooltip } from "./components/tooltip";
|
|
30
30
|
import { PopsCSS } from "./PopsCSS";
|
|
31
31
|
import { PopsIcon } from "./PopsIcon";
|
|
32
|
-
import {
|
|
32
|
+
import { PopsInstData } from "./PopsInst";
|
|
33
33
|
import { PopsAnimation } from "./PopsAnimation";
|
|
34
34
|
|
|
35
35
|
class Pops {
|
|
36
36
|
/** 配置 */
|
|
37
37
|
config = {
|
|
38
38
|
/** 版本号 */
|
|
39
|
-
version: "2025.7.
|
|
39
|
+
version: "2025.7.13",
|
|
40
40
|
cssText: PopsCSS,
|
|
41
41
|
/** icon图标的svg代码 */
|
|
42
42
|
iconSVG: PopsIcon.$data,
|
|
43
43
|
/** 当前已配置的动画@keyframes名字映射(初始化时生成) */
|
|
44
44
|
animation: PopsAnimation.$data,
|
|
45
45
|
/** 存储已创建的元素 */
|
|
46
|
-
|
|
46
|
+
instData: PopsInstData,
|
|
47
47
|
/** 禁止滚动 */
|
|
48
48
|
forbiddenScroll: {
|
|
49
49
|
event(event: Event) {
|
package/src/PopsInst.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PopsInstCommonConfig } from "./types/inst";
|
|
2
|
+
import type { PopsInstStoreType } from "./types/main";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 弹窗实例数据
|
|
6
|
+
*/
|
|
7
|
+
export const PopsInstData: {
|
|
8
|
+
[key in PopsInstStoreType]: PopsInstCommonConfig[];
|
|
9
|
+
} = {
|
|
10
|
+
alert: [],
|
|
11
|
+
confirm: [],
|
|
12
|
+
drawer: [],
|
|
13
|
+
folder: [],
|
|
14
|
+
iframe: [],
|
|
15
|
+
loading: [],
|
|
16
|
+
panel: [],
|
|
17
|
+
prompt: [],
|
|
18
|
+
rightClickMenu: [],
|
|
19
|
+
// 没有 searchSuggestion
|
|
20
|
+
tooltip: [],
|
|
21
|
+
};
|
|
@@ -5,7 +5,7 @@ import { popsDOMUtils } from "../../utils/PopsDOMUtils";
|
|
|
5
5
|
import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
|
|
6
6
|
import { popsUtils } from "../../utils/PopsUtils";
|
|
7
7
|
import { PopsAlertConfig } from "./config";
|
|
8
|
-
import type {
|
|
8
|
+
import type { PopsType } from "../../types/main";
|
|
9
9
|
import type { PopsAlertDetails } from "./types";
|
|
10
10
|
import { PopsCSS } from "../../PopsCSS";
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ export const PopsAlert = {
|
|
|
13
13
|
init(details: PopsAlertDetails) {
|
|
14
14
|
const guid = popsUtils.getRandomGUID();
|
|
15
15
|
// 设置当前类型
|
|
16
|
-
const PopsType:
|
|
16
|
+
const PopsType: PopsType = "alert";
|
|
17
17
|
let config = PopsAlertConfig();
|
|
18
18
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
19
19
|
config = popsUtils.assign(config, details);
|
|
@@ -3,7 +3,7 @@ import { GlobalConfig } from "../../GlobalConfig";
|
|
|
3
3
|
import { PopsElementHandler } from "../../handler/PopsElementHandler";
|
|
4
4
|
import { PopsHandler } from "../../handler/PopsHandler";
|
|
5
5
|
import { PopsCSS } from "../../PopsCSS";
|
|
6
|
-
import {
|
|
6
|
+
import { PopsInstData } from "../../PopsInst";
|
|
7
7
|
import type { PopsEventDetails } from "../../types/event";
|
|
8
8
|
import { popsDOMUtils } from "../../utils/PopsDOMUtils";
|
|
9
9
|
import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
|
|
@@ -323,7 +323,7 @@ export const PopsIframe = {
|
|
|
323
323
|
(event) => {
|
|
324
324
|
event.preventDefault();
|
|
325
325
|
event.stopPropagation();
|
|
326
|
-
PopsInstanceUtils.removeInstance([
|
|
326
|
+
PopsInstanceUtils.removeInstance([PopsInstData.iframe], guid, false);
|
|
327
327
|
if (typeof config?.btn?.close?.callback === "function") {
|
|
328
328
|
config.btn.close.callback(eventDetails, event);
|
|
329
329
|
}
|
|
@@ -2727,14 +2727,18 @@ export const PanelHandlerComponents = () => {
|
|
|
2727
2727
|
});
|
|
2728
2728
|
Reflect.set($deepMenuContainer, "__formConfig__", formConfig);
|
|
2729
2729
|
let $deepMenuHeaderUL = popsDOMUtils.createElement("ul", {
|
|
2730
|
-
className:
|
|
2730
|
+
className:
|
|
2731
|
+
"pops-panel-container-header-ul pops-panel-deepMenu-container-header-ul",
|
|
2732
|
+
});
|
|
2733
|
+
let $deepMenuMain = popsDOMUtils.createElement("ul", {
|
|
2734
|
+
className: "pops-panel-container-main-ul",
|
|
2731
2735
|
});
|
|
2732
|
-
let $deepMenuBodyUL = popsDOMUtils.createElement("ul");
|
|
2733
2736
|
// 标题文字
|
|
2734
2737
|
let headerTitleText = formConfig.headerTitle ?? formConfig.text;
|
|
2735
|
-
let $header = popsDOMUtils.createElement("
|
|
2736
|
-
className:
|
|
2737
|
-
|
|
2738
|
+
let $header = popsDOMUtils.createElement("li", {
|
|
2739
|
+
className:
|
|
2740
|
+
"pops-panel-container-header-title-text pops-panel-deepMenu-container-header",
|
|
2741
|
+
innerHTML: /*html*/ `<p class="pops-panel-deepMenu-container-header-title-text">${headerTitleText}</p>`,
|
|
2738
2742
|
});
|
|
2739
2743
|
let $headerLeftArrow = popsDOMUtils.createElement("i", {
|
|
2740
2744
|
className: "pops-panel-deepMenu-container-left-arrow-icon",
|
|
@@ -2763,12 +2767,12 @@ export const PanelHandlerComponents = () => {
|
|
|
2763
2767
|
);
|
|
2764
2768
|
$deepMenuHeaderUL.appendChild($header);
|
|
2765
2769
|
$deepMenuContainer.appendChild($deepMenuHeaderUL);
|
|
2766
|
-
$deepMenuContainer.appendChild($
|
|
2770
|
+
$deepMenuContainer.appendChild($deepMenuMain);
|
|
2767
2771
|
|
|
2768
2772
|
if (formConfig.forms && Array.isArray(formConfig.forms)) {
|
|
2769
2773
|
for (let index = 0; index < formConfig.forms.length; index++) {
|
|
2770
2774
|
let formItemConfig = formConfig.forms[index];
|
|
2771
|
-
this.initFormItem($
|
|
2775
|
+
this.initFormItem($deepMenuMain, formItemConfig);
|
|
2772
2776
|
}
|
|
2773
2777
|
}
|
|
2774
2778
|
that.$el.$content?.appendChild($deepMenuContainer);
|
|
@@ -2778,7 +2782,7 @@ export const PanelHandlerComponents = () => {
|
|
|
2778
2782
|
sectionContainer: $deepMenuContainer,
|
|
2779
2783
|
sectionContainerHeaderContainer: $deepMenuHeaderUL,
|
|
2780
2784
|
sectionContainerHeader: $header,
|
|
2781
|
-
sectionBodyContainer: $
|
|
2785
|
+
sectionBodyContainer: $deepMenuMain,
|
|
2782
2786
|
});
|
|
2783
2787
|
}
|
|
2784
2788
|
that.triggerRenderRightContainer($deepMenuContainer);
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
--pops-panel-forms-margin-top-bottom: 10px;
|
|
11
11
|
--pops-panel-forms-margin-left-right: 20px;
|
|
12
|
-
--pops-panel-forms-header-icon-size:
|
|
12
|
+
--pops-panel-forms-header-icon-size: calc(
|
|
13
|
+
var(--pops-panel-forms-container-li-padding-left-right) + 1px
|
|
14
|
+
);
|
|
13
15
|
--pops-panel-forms-header-padding-top-bottom: 15px;
|
|
14
16
|
--pops-panel-forms-header-padding-left-right: 10px;
|
|
15
17
|
--pops-panel-forms-container-item-left-text-gap: 6px;
|
|
@@ -139,13 +141,18 @@ section.pops-panel-container .pops-panel-forms-container-item-header-text {
|
|
|
139
141
|
section.pops-panel-container li.pops-panel-forms-container-item {
|
|
140
142
|
display: block;
|
|
141
143
|
}
|
|
142
|
-
section.pops-panel-container
|
|
144
|
+
section.pops-panel-container
|
|
145
|
+
.pops-panel-forms-container-item
|
|
146
|
+
ul.pops-panel-forms-container-item-formlist {
|
|
143
147
|
border-radius: var(--pops-panel-forms-container-item-border-radius);
|
|
144
148
|
background: var(--pops-panel-forms-container-item-bg-color);
|
|
145
149
|
margin: var(--pops-panel-forms-container-item-margin-top-bottom)
|
|
146
150
|
var(--pops-panel-forms-margin-left-right);
|
|
147
151
|
}
|
|
148
|
-
section.pops-panel-container
|
|
152
|
+
section.pops-panel-container
|
|
153
|
+
.pops-panel-forms-container-item
|
|
154
|
+
ul.pops-panel-forms-container-item-formlist
|
|
155
|
+
li {
|
|
149
156
|
display: flex;
|
|
150
157
|
justify-content: space-between;
|
|
151
158
|
align-items: center;
|
|
@@ -163,7 +170,10 @@ section.pops-panel-container
|
|
|
163
170
|
margin: 0px;
|
|
164
171
|
border-bottom: 0;
|
|
165
172
|
}
|
|
166
|
-
section.pops-panel-container
|
|
173
|
+
section.pops-panel-container
|
|
174
|
+
.pops-panel-forms-container-item
|
|
175
|
+
ul.pops-panel-forms-container-item-formlist
|
|
176
|
+
li:last-child {
|
|
167
177
|
border: 0;
|
|
168
178
|
}
|
|
169
179
|
/* 左侧的文字 */
|
|
@@ -1093,7 +1103,9 @@ section.pops-panel-container
|
|
|
1093
1103
|
display: flex;
|
|
1094
1104
|
align-items: center;
|
|
1095
1105
|
}
|
|
1096
|
-
.pops-panel-deepMenu-container
|
|
1106
|
+
section.pops-panel-deepMenu-container
|
|
1107
|
+
.pops-panel-container-header-ul
|
|
1108
|
+
li.pops-panel-deepMenu-container-header {
|
|
1097
1109
|
display: flex;
|
|
1098
1110
|
align-items: center;
|
|
1099
1111
|
width: -webkit-fill-available;
|
|
@@ -1104,6 +1116,7 @@ section.pops-panel-container
|
|
|
1104
1116
|
var(--pops-panel-forms-container-li-padding-left-right) -
|
|
1105
1117
|
var(--pops-panel-forms-header-icon-size)
|
|
1106
1118
|
);
|
|
1119
|
+
gap: 0px;
|
|
1107
1120
|
}
|
|
1108
1121
|
.pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {
|
|
1109
1122
|
width: var(--pops-panel-forms-header-icon-size);
|
|
@@ -69,7 +69,7 @@ export interface PopsPanelDeepMenuDetails
|
|
|
69
69
|
/** 右侧的总容器的标题头容器 */
|
|
70
70
|
sectionContainerHeaderContainer: HTMLUListElement;
|
|
71
71
|
/** 右侧的总容器的标题头 */
|
|
72
|
-
sectionContainerHeader:
|
|
72
|
+
sectionContainerHeader: HTMLLIElement;
|
|
73
73
|
/** 右侧的内容容器 */
|
|
74
74
|
sectionBodyContainer: HTMLUListElement;
|
|
75
75
|
}
|
|
@@ -184,8 +184,8 @@ export const PopsRightClickMenu = {
|
|
|
184
184
|
guid: guid,
|
|
185
185
|
animElement: rootElement,
|
|
186
186
|
popsElement: rootElement,
|
|
187
|
-
beforeRemoveCallBack(
|
|
188
|
-
PopsContextMenu.closeAllMenu(
|
|
187
|
+
beforeRemoveCallBack(instCommonConfig) {
|
|
188
|
+
PopsContextMenu.closeAllMenu(instCommonConfig.popsElement);
|
|
189
189
|
},
|
|
190
190
|
});
|
|
191
191
|
}
|
package/src/css/scrollbar.css
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* ::-webkit-scrollbar 是非标准的css */
|
|
2
|
+
/* https://caniuse.com/?search=%20%3A%3A-webkit-scrollbar */
|
|
2
3
|
.pops ::-webkit-scrollbar {
|
|
3
4
|
width: 6px;
|
|
4
5
|
height: 0;
|
|
5
6
|
}
|
|
6
7
|
|
|
8
|
+
/* 滚动条轨道 */
|
|
7
9
|
.pops ::-webkit-scrollbar-track {
|
|
8
10
|
width: 0;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
background: rgb(178, 178, 178, var(--pops-bg-opacity));
|
|
12
|
-
}
|
|
12
|
+
/* 滚动条滑块 */
|
|
13
13
|
.pops ::-webkit-scrollbar-thumb {
|
|
14
14
|
min-height: 28px;
|
|
15
15
|
border-radius: 2em;
|
|
16
|
-
background: rgb(204, 204, 204, var(--pops-bg-opacity));
|
|
16
|
+
background: rgb(204, 204, 204, var(--pops-bg-opacity, 1));
|
|
17
17
|
background-clip: padding-box;
|
|
18
18
|
}
|
|
19
|
+
/* 滚动条滑块 */
|
|
20
|
+
.pops ::-webkit-scrollbar-thumb:hover {
|
|
21
|
+
background: rgb(178, 178, 178, var(--pops-bg-opacity, 1));
|
|
22
|
+
}
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
PopsSupportBottomBtn,
|
|
8
8
|
PopsSupportContent,
|
|
9
9
|
PopsSupportHeaderTitle,
|
|
10
|
-
|
|
10
|
+
PopsSupportAnimType,
|
|
11
11
|
PopsTypeSupportBottomBtn,
|
|
12
12
|
PopsTypeSupportContent,
|
|
13
13
|
PopsTypeSupportHeaderTitle,
|
|
@@ -40,7 +40,7 @@ export const PopsElementHandler = {
|
|
|
40
40
|
*/
|
|
41
41
|
getAnimHTML(
|
|
42
42
|
guid: string,
|
|
43
|
-
type:
|
|
43
|
+
type: PopsSupportAnimType,
|
|
44
44
|
config: PopsSupportAnim[keyof PopsSupportAnim],
|
|
45
45
|
html = "",
|
|
46
46
|
bottomBtnHTML = "",
|