@whitesev/pops 2.5.0 → 2.5.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 +319 -159
- 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 +319 -159
- 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 +319 -159
- 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 +319 -159
- 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 +319 -159
- 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 +319 -159
- 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/src/Pops.d.ts +23 -19
- package/dist/types/src/components/panel/handlerComponents.d.ts +40 -21
- package/dist/types/src/components/panel/types/components-button.d.ts +8 -19
- package/dist/types/src/components/panel/types/components-common.d.ts +23 -0
- package/dist/types/src/components/panel/types/components-deepMenu.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-forms.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-input.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-own.d.ts +0 -14
- package/dist/types/src/components/panel/types/components-select.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-slider.d.ts +0 -19
- package/dist/types/src/components/panel/types/components-switch.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-textarea.d.ts +0 -21
- package/dist/types/src/components/panel/types/index.d.ts +76 -11
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -8
- package/dist/types/src/handler/PopsHandler.d.ts +44 -28
- package/dist/types/src/types/global.d.ts +11 -9
- package/dist/types/src/utils/PopsDOMUtils.d.ts +1 -1
- package/package.json +1 -1
- package/src/PopsAnimation.ts +6 -6
- package/src/components/alert/index.ts +4 -4
- package/src/components/confirm/index.ts +6 -6
- package/src/components/drawer/index.ts +7 -2
- package/src/components/folder/index.ts +22 -22
- package/src/components/iframe/index.ts +13 -12
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +58 -5
- package/src/components/panel/handlerComponents.ts +161 -74
- package/src/components/panel/index.css +30 -6
- package/src/components/panel/index.ts +30 -15
- package/src/components/panel/types/components-button.ts +8 -21
- package/src/components/panel/types/components-common.ts +27 -0
- package/src/components/panel/types/components-deepMenu.ts +0 -20
- package/src/components/panel/types/components-forms.ts +0 -20
- package/src/components/panel/types/components-input.ts +0 -23
- package/src/components/panel/types/components-own.ts +0 -14
- package/src/components/panel/types/components-select.ts +0 -23
- package/src/components/panel/types/components-selectMultiple.ts +0 -20
- package/src/components/panel/types/components-slider.ts +0 -21
- package/src/components/panel/types/components-switch.ts +0 -23
- package/src/components/panel/types/components-textarea.ts +0 -23
- package/src/components/panel/types/index.ts +81 -13
- package/src/components/prompt/index.ts +7 -7
- package/src/components/searchSuggestion/index.ts +5 -11
- package/src/handler/PopsHandler.ts +47 -30
- package/src/types/global.d.ts +11 -9
- package/src/utils/PopsDOMUtils.ts +14 -14
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ declare class Pops {
|
|
|
128
128
|
getTextBoundingRect(input: HTMLInputElement | HTMLTextAreaElement, selectionStart: number | string, selectionEnd: number | string, debug: boolean): DOMRect;
|
|
129
129
|
cssHide(ele: Element | null, isImportant?: boolean): void;
|
|
130
130
|
cssShow(ele: Element | null): void;
|
|
131
|
-
|
|
131
|
+
toElement<T1 extends boolean, T2 extends boolean>(html: string, useParser?: T1 | undefined, isComplete?: T2 | undefined): import("./types/PopsDOMUtilsEventType").ParseHTMLReturnType<T1, T2>;
|
|
132
132
|
append(element: Element | Node | ShadowRoot | HTMLElement | string, content: HTMLElement | string | (HTMLElement | string | Element)[] | NodeList): void;
|
|
133
133
|
appendHead($ele: HTMLElement): void;
|
|
134
134
|
appendBody($ele: HTMLElement): void;
|
|
@@ -228,9 +228,13 @@ declare class Pops {
|
|
|
228
228
|
$el: {
|
|
229
229
|
$pops: HTMLElement;
|
|
230
230
|
$content: HTMLElement;
|
|
231
|
-
$
|
|
232
|
-
$
|
|
233
|
-
$
|
|
231
|
+
$panelRightSectionWrapper: HTMLElement;
|
|
232
|
+
$panelLeftAside: HTMLElement;
|
|
233
|
+
$panelContentSectionContainer: HTMLElement;
|
|
234
|
+
$panelBottomWrapper: HTMLElement;
|
|
235
|
+
$panelBottomContainer: HTMLElement;
|
|
236
|
+
$panelBottomLeftContainer: HTMLElement;
|
|
237
|
+
$panelBottomRightContainer: HTMLElement;
|
|
234
238
|
};
|
|
235
239
|
$config: Required<PopsPanelDetails>;
|
|
236
240
|
init(details: {
|
|
@@ -238,18 +242,24 @@ declare class Pops {
|
|
|
238
242
|
$el: {
|
|
239
243
|
$pops: HTMLElement;
|
|
240
244
|
$content: HTMLElement;
|
|
241
|
-
$
|
|
242
|
-
$
|
|
243
|
-
$
|
|
245
|
+
$panelRightSectionWrapper: HTMLElement;
|
|
246
|
+
$panelLeftAside: HTMLElement;
|
|
247
|
+
$panelContentSectionContainer: HTMLElement;
|
|
248
|
+
$panelBottomWrapper: HTMLElement;
|
|
249
|
+
$panelBottomContainer: HTMLElement;
|
|
250
|
+
$panelBottomLeftContainer: HTMLElement;
|
|
251
|
+
$panelBottomRightContainer: HTMLElement;
|
|
244
252
|
};
|
|
245
253
|
}): void;
|
|
246
254
|
clearContainer(): void;
|
|
247
255
|
clearDeepMenuContainer(): void;
|
|
248
256
|
clearAsideItemIsVisited(): void;
|
|
249
|
-
setAsideItemIsVisited(
|
|
250
|
-
setElementAttributes(
|
|
251
|
-
setElementProps(
|
|
252
|
-
setElementClassName(
|
|
257
|
+
setAsideItemIsVisited($el: HTMLElement): void;
|
|
258
|
+
setElementAttributes($el: HTMLElement, attributes?: any): void;
|
|
259
|
+
setElementProps($el: HTMLElement, props?: any): void;
|
|
260
|
+
setElementClassName($el: HTMLElement, className?: string | string[] | (() => string | string[])): void;
|
|
261
|
+
createBottomItem(bottomItemConfig: import("./components/panel/types").PopsPanelBottomContentConfig): HTMLLIElement;
|
|
262
|
+
setBottomItemClickEvent($bottomItem: HTMLElement, bottomItemConfig: import("./components/panel/types").PopsPanelBottomContentConfig): void;
|
|
253
263
|
createAsideItem(asideConfig: import("./components/panel/types").PopsPanelContentConfig): HTMLLIElement;
|
|
254
264
|
createSectionContainerItem_switch(formConfig: import("./components/panel/types/components-switch").PopsPanelSwitchDetails): HTMLLIElement;
|
|
255
265
|
createSectionContainerItem_slider(formConfig: import("./components/panel/types/components-slider").PopsPanelSliderDetails): HTMLLIElement;
|
|
@@ -265,7 +275,7 @@ declare class Pops {
|
|
|
265
275
|
createSectionContainerItem_forms(formConfig: import("./components/panel/types").PopsPanelContentConfig | import("./components/panel/types/components-forms").PopsPanelFormsDetails): void;
|
|
266
276
|
triggerRenderRightContainer($container: HTMLElement): void;
|
|
267
277
|
uListContainerAddItem(formConfig: import("./components/panel/types").PopsPanelFormsTotalDetails, containerOptions: Omit<import("./components/panel/types/components-common").PopsPanelRightAsideContainerOptions, "target">): void;
|
|
268
|
-
setAsideItemClickEvent(
|
|
278
|
+
setAsideItemClickEvent($asideItem: HTMLElement, asideConfig: import("./components/panel/types").PopsPanelContentConfig): void;
|
|
269
279
|
};
|
|
270
280
|
};
|
|
271
281
|
init(): void;
|
|
@@ -21367,13 +21377,7 @@ declare class Pops {
|
|
|
21367
21377
|
};
|
|
21368
21378
|
};
|
|
21369
21379
|
targetSelector: string | null;
|
|
21370
|
-
data:
|
|
21371
|
-
icon: import("./types/icon").PopsIconType | string;
|
|
21372
|
-
iconIsLoading: boolean;
|
|
21373
|
-
text: string | (() => string);
|
|
21374
|
-
callback: (clickEvent: PointerEvent, contextMenuEvent: PointerEvent, liElement: HTMLLIElement, menuListenerRootNode: HTMLElement) => boolean | void | Promise<boolean | void>;
|
|
21375
|
-
item: /*elided*/ any[] | null;
|
|
21376
|
-
}[];
|
|
21380
|
+
data: import("./components/rightClickMenu/types").PopsRightClickMenuDataDetails[];
|
|
21377
21381
|
chileMenuLeftOrRightDistance: number;
|
|
21378
21382
|
childMenuTopOrBottomDistance: number;
|
|
21379
21383
|
className: string;
|
|
@@ -2,7 +2,7 @@ import type { PopsPanelButtonDetails } from "./types/components-button";
|
|
|
2
2
|
import type { PopsPanelRightAsideContainerOptions } from "./types/components-common";
|
|
3
3
|
import type { PopsPanelDeepMenuDetails } from "./types/components-deepMenu";
|
|
4
4
|
import type { PopsPanelFormsDetails } from "./types/components-forms";
|
|
5
|
-
import type { PopsPanelContentConfig, PopsPanelDetails, PopsPanelFormsTotalDetails } from "./types";
|
|
5
|
+
import type { PopsPanelBottomContentConfig, PopsPanelContentConfig, PopsPanelDetails, PopsPanelFormsTotalDetails } from "./types";
|
|
6
6
|
import type { PopsPanelInputDetails } from "./types/components-input";
|
|
7
7
|
import type { PopsPanelOwnDetails } from "./types/components-own";
|
|
8
8
|
import type { PopsPanelSelectMultipleDetails } from "./types/components-selectMultiple";
|
|
@@ -39,11 +39,15 @@ export declare const PanelHandlerComponents: () => {
|
|
|
39
39
|
/** 内容 */
|
|
40
40
|
$content: HTMLElement;
|
|
41
41
|
/** section元素的包裹容器 */
|
|
42
|
-
$
|
|
42
|
+
$panelRightSectionWrapper: HTMLElement;
|
|
43
43
|
/** 左侧容器 */
|
|
44
|
-
$
|
|
44
|
+
$panelLeftAside: HTMLElement;
|
|
45
45
|
/** 右侧容器 */
|
|
46
|
-
$
|
|
46
|
+
$panelContentSectionContainer: HTMLElement;
|
|
47
|
+
$panelBottomWrapper: HTMLElement;
|
|
48
|
+
$panelBottomContainer: HTMLElement;
|
|
49
|
+
$panelBottomLeftContainer: HTMLElement;
|
|
50
|
+
$panelBottomRightContainer: HTMLElement;
|
|
47
51
|
};
|
|
48
52
|
$config: Required<PopsPanelDetails>;
|
|
49
53
|
/**
|
|
@@ -55,9 +59,13 @@ export declare const PanelHandlerComponents: () => {
|
|
|
55
59
|
$el: {
|
|
56
60
|
$pops: HTMLElement;
|
|
57
61
|
$content: HTMLElement;
|
|
58
|
-
$
|
|
59
|
-
$
|
|
60
|
-
$
|
|
62
|
+
$panelRightSectionWrapper: HTMLElement;
|
|
63
|
+
$panelLeftAside: HTMLElement;
|
|
64
|
+
$panelContentSectionContainer: HTMLElement;
|
|
65
|
+
$panelBottomWrapper: HTMLElement;
|
|
66
|
+
$panelBottomContainer: HTMLElement;
|
|
67
|
+
$panelBottomLeftContainer: HTMLElement;
|
|
68
|
+
$panelBottomRightContainer: HTMLElement;
|
|
61
69
|
};
|
|
62
70
|
}): void;
|
|
63
71
|
/**
|
|
@@ -74,30 +82,41 @@ export declare const PanelHandlerComponents: () => {
|
|
|
74
82
|
clearAsideItemIsVisited(): void;
|
|
75
83
|
/**
|
|
76
84
|
* 设置左侧容器已访问记录
|
|
77
|
-
* @param
|
|
85
|
+
* @param $el
|
|
78
86
|
*/
|
|
79
|
-
setAsideItemIsVisited(
|
|
87
|
+
setAsideItemIsVisited($el: HTMLElement): void;
|
|
80
88
|
/**
|
|
81
89
|
* 为元素添加自定义属性
|
|
82
|
-
* @param
|
|
83
|
-
* @param attributes
|
|
90
|
+
* @param $el 元素
|
|
91
|
+
* @param attributes 属性
|
|
84
92
|
*/
|
|
85
|
-
setElementAttributes(
|
|
93
|
+
setElementAttributes($el: HTMLElement, attributes?: any): void;
|
|
86
94
|
/**
|
|
87
95
|
* 为元素设置(自定义)属性
|
|
88
|
-
* @param
|
|
89
|
-
* @param props
|
|
96
|
+
* @param $el 元素
|
|
97
|
+
* @param props 属性
|
|
90
98
|
*/
|
|
91
|
-
setElementProps(
|
|
99
|
+
setElementProps($el: HTMLElement, props?: any): void;
|
|
92
100
|
/**
|
|
93
101
|
* 为元素设置classname
|
|
94
|
-
* @param
|
|
102
|
+
* @param $el 元素
|
|
95
103
|
* @param className
|
|
96
104
|
*/
|
|
97
|
-
setElementClassName(
|
|
105
|
+
setElementClassName($el: HTMLElement, className?: string | string[] | (() => string | string[])): void;
|
|
106
|
+
/**
|
|
107
|
+
* 创建底部项元素<li>
|
|
108
|
+
* @param bottomItemConfig 配置
|
|
109
|
+
*/
|
|
110
|
+
createBottomItem(bottomItemConfig: PopsPanelBottomContentConfig): HTMLLIElement;
|
|
111
|
+
/**
|
|
112
|
+
* 为底部元素添加点击事件
|
|
113
|
+
* @param $bottomItem 底部<li>元素
|
|
114
|
+
* @param bottomItemConfig 配置
|
|
115
|
+
*/
|
|
116
|
+
setBottomItemClickEvent($bottomItem: HTMLElement, bottomItemConfig: PopsPanelBottomContentConfig): void;
|
|
98
117
|
/**
|
|
99
118
|
* 创建左侧容器元素<li>
|
|
100
|
-
* @param asideConfig
|
|
119
|
+
* @param asideConfig 配置
|
|
101
120
|
*/
|
|
102
121
|
createAsideItem(asideConfig: PopsPanelContentConfig): HTMLLIElement;
|
|
103
122
|
/**
|
|
@@ -172,7 +191,7 @@ export declare const PanelHandlerComponents: () => {
|
|
|
172
191
|
*/
|
|
173
192
|
createSectionContainerItem_forms(formConfig: PopsPanelContentConfig | PopsPanelFormsDetails): void;
|
|
174
193
|
/**
|
|
175
|
-
*
|
|
194
|
+
* 主动触发触发渲染右侧容器的事件
|
|
176
195
|
*/
|
|
177
196
|
triggerRenderRightContainer($container: HTMLElement): void;
|
|
178
197
|
/**
|
|
@@ -183,8 +202,8 @@ export declare const PanelHandlerComponents: () => {
|
|
|
183
202
|
uListContainerAddItem(formConfig: PopsPanelFormsTotalDetails, containerOptions: Omit<PopsPanelRightAsideContainerOptions, "target">): void;
|
|
184
203
|
/**
|
|
185
204
|
* 为左侧容器元素添加点击事件
|
|
186
|
-
* @param
|
|
205
|
+
* @param $asideItem 左侧的容器<li>元素
|
|
187
206
|
* @param asideConfig 配置
|
|
188
207
|
*/
|
|
189
|
-
setAsideItemClickEvent(
|
|
208
|
+
setAsideItemClickEvent($asideItem: HTMLElement, asideConfig: PopsPanelContentConfig): void;
|
|
190
209
|
};
|
|
@@ -5,24 +5,6 @@ import type { PopsIconType } from "../../../types/icon";
|
|
|
5
5
|
* pops.panel的 button
|
|
6
6
|
*/
|
|
7
7
|
export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanelButtonDetails> {
|
|
8
|
-
/**
|
|
9
|
-
* (可选)className属性
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
*/
|
|
15
|
-
attributes?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
} | {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}[];
|
|
20
|
-
/**
|
|
21
|
-
* (可选)自定义属性
|
|
22
|
-
*/
|
|
23
|
-
props?: {
|
|
24
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
25
|
-
};
|
|
26
8
|
/**
|
|
27
9
|
* 显示在左边的文字
|
|
28
10
|
*/
|
|
@@ -48,15 +30,22 @@ export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanel
|
|
|
48
30
|
*/
|
|
49
31
|
buttonText: string | (() => string);
|
|
50
32
|
/**
|
|
51
|
-
* 按钮的图标,已配置的svg请看pops.config.iconSVG,或者自定义的图标svg
|
|
33
|
+
* 按钮的图标,已配置的svg请看pops.config.iconSVG,或者自定义的图标svg代码,留空则是没有图标
|
|
34
|
+
* @default ""
|
|
52
35
|
*/
|
|
53
36
|
buttonIcon?: PopsIconType;
|
|
54
37
|
/**
|
|
55
38
|
* 按钮的图标在右边
|
|
39
|
+
* + true 右边
|
|
40
|
+
* + false 左边
|
|
41
|
+
* @default false
|
|
56
42
|
*/
|
|
57
43
|
buttonIsRightIcon?: boolean;
|
|
58
44
|
/**
|
|
59
45
|
* 按钮的图标旋转
|
|
46
|
+
* + true 旋转
|
|
47
|
+
* + false 不旋转
|
|
48
|
+
* @default false
|
|
60
49
|
*/
|
|
61
50
|
buttonIconIsLoading?: boolean;
|
|
62
51
|
/**
|
|
@@ -19,6 +19,29 @@ export interface PopsPanelRightAsideContainerOptions {
|
|
|
19
19
|
* 通用配置
|
|
20
20
|
*/
|
|
21
21
|
export interface PopsPanelCommonDetails<T extends PopsPanelFormsTotalDetails | PopsPanelFormsDetails> {
|
|
22
|
+
/**
|
|
23
|
+
* (可选)className属性
|
|
24
|
+
* @default ""
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* (可选)自定义元素属性
|
|
29
|
+
* @default {}
|
|
30
|
+
*/
|
|
31
|
+
attributes?: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
} | {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}[];
|
|
36
|
+
/**
|
|
37
|
+
* (可选)自定义属性
|
|
38
|
+
* @default {}
|
|
39
|
+
*/
|
|
40
|
+
props?: {
|
|
41
|
+
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
42
|
+
} | {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
};
|
|
22
45
|
/**
|
|
23
46
|
* 在添加到<ul>元素后触发该回调
|
|
24
47
|
* @param formConfig 配置
|
|
@@ -9,24 +9,6 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails<PopsPan
|
|
|
9
9
|
* 类型
|
|
10
10
|
*/
|
|
11
11
|
type: "deepMenu";
|
|
12
|
-
/**
|
|
13
|
-
* (可选)className属性
|
|
14
|
-
*/
|
|
15
|
-
className?: string;
|
|
16
|
-
/**
|
|
17
|
-
* (可选)自定义元素属性
|
|
18
|
-
*/
|
|
19
|
-
attributes?: {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
} | {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}[];
|
|
24
|
-
/**
|
|
25
|
-
* (可选)自定义属性
|
|
26
|
-
*/
|
|
27
|
-
props?: {
|
|
28
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
29
|
-
};
|
|
30
12
|
/**
|
|
31
13
|
* 显示在左边的文字
|
|
32
14
|
*/
|
|
@@ -4,24 +4,6 @@ import type { PopsPanelFormsTotalDetails } from ".";
|
|
|
4
4
|
* pops.panel的 forms
|
|
5
5
|
*/
|
|
6
6
|
export interface PopsPanelFormsDetails extends PopsPanelCommonDetails<PopsPanelFormsDetails> {
|
|
7
|
-
/**
|
|
8
|
-
* (可选)className属性
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* (可选)自定义元素属性
|
|
13
|
-
*/
|
|
14
|
-
attributes?: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
} | {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}[];
|
|
19
|
-
/**
|
|
20
|
-
* (可选)自定义属性
|
|
21
|
-
*/
|
|
22
|
-
props?: {
|
|
23
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
24
|
-
};
|
|
25
7
|
/**
|
|
26
8
|
* 显示在左边的文字
|
|
27
9
|
*/
|
|
@@ -3,27 +3,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
3
3
|
* pops.panel的 input
|
|
4
4
|
*/
|
|
5
5
|
export interface PopsPanelInputDetails extends PopsPanelCommonDetails<PopsPanelInputDetails> {
|
|
6
|
-
/**
|
|
7
|
-
* (可选)className属性
|
|
8
|
-
* @default ""
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* (可选)自定义元素属性
|
|
13
|
-
* @default {}
|
|
14
|
-
*/
|
|
15
|
-
attributes?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
} | {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}[];
|
|
20
|
-
/**
|
|
21
|
-
* (可选)自定义属性
|
|
22
|
-
* @default {}
|
|
23
|
-
*/
|
|
24
|
-
props?: {
|
|
25
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
26
|
-
};
|
|
27
6
|
/**
|
|
28
7
|
* 显示在左边的文字
|
|
29
8
|
*/
|
|
@@ -4,20 +4,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
4
4
|
* 自定义的
|
|
5
5
|
*/
|
|
6
6
|
export interface PopsPanelOwnDetails extends PopsPanelCommonDetails<PopsPanelOwnDetails> {
|
|
7
|
-
/**
|
|
8
|
-
* (可选)className属性
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* (可选)自定义元素属性
|
|
13
|
-
*/
|
|
14
|
-
attributes?: any;
|
|
15
|
-
/**
|
|
16
|
-
* (可选)自定义属性
|
|
17
|
-
*/
|
|
18
|
-
props?: {
|
|
19
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
20
|
-
};
|
|
21
7
|
/**
|
|
22
8
|
* 类型
|
|
23
9
|
*/
|
|
@@ -5,27 +5,6 @@ import type { PopsPanelFormsTotalDetails } from ".";
|
|
|
5
5
|
* pops.panel的 select
|
|
6
6
|
*/
|
|
7
7
|
export interface PopsPanelSelectDetails<T = any> extends PopsPanelCommonDetails<PopsPanelSelectDetails> {
|
|
8
|
-
/**
|
|
9
|
-
* (可选)className属性
|
|
10
|
-
* @default ""
|
|
11
|
-
*/
|
|
12
|
-
className?: string;
|
|
13
|
-
/**
|
|
14
|
-
* (可选)自定义元素属性
|
|
15
|
-
* @default {}
|
|
16
|
-
*/
|
|
17
|
-
attributes?: {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
} | {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}[];
|
|
22
|
-
/**
|
|
23
|
-
* (可选)自定义属性
|
|
24
|
-
* @default {}
|
|
25
|
-
*/
|
|
26
|
-
props?: {
|
|
27
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
28
|
-
};
|
|
29
8
|
/**
|
|
30
9
|
* 显示在左边的文字
|
|
31
10
|
*/
|
|
@@ -32,24 +32,6 @@ export interface PopsPanelSelectMultipleDataOption<T> {
|
|
|
32
32
|
* pops.panel的 select
|
|
33
33
|
*/
|
|
34
34
|
export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommonDetails<PopsPanelSelectMultipleDetails> {
|
|
35
|
-
/**
|
|
36
|
-
* (可选)className属性
|
|
37
|
-
*/
|
|
38
|
-
className?: string;
|
|
39
|
-
/**
|
|
40
|
-
* (可选)自定义元素属性
|
|
41
|
-
*/
|
|
42
|
-
attributes?: {
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
} | {
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}[];
|
|
47
|
-
/**
|
|
48
|
-
* (可选)自定义属性
|
|
49
|
-
*/
|
|
50
|
-
props?: {
|
|
51
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
52
|
-
};
|
|
53
35
|
/**
|
|
54
36
|
* 显示在左边的文字
|
|
55
37
|
*/
|
|
@@ -3,25 +3,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
3
3
|
* pops.panel的 slider
|
|
4
4
|
*/
|
|
5
5
|
export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanelSliderDetails> {
|
|
6
|
-
/**
|
|
7
|
-
* className属性
|
|
8
|
-
* @default ""
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* 自定义元素属性
|
|
13
|
-
*/
|
|
14
|
-
attributes?: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
} | {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}[];
|
|
19
|
-
/**
|
|
20
|
-
* 自定义属性
|
|
21
|
-
*/
|
|
22
|
-
props?: {
|
|
23
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
24
|
-
};
|
|
25
6
|
/**
|
|
26
7
|
* 显示在左边的文字
|
|
27
8
|
*/
|
|
@@ -3,27 +3,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
3
3
|
* pops.panel的 switch
|
|
4
4
|
*/
|
|
5
5
|
export interface PopsPanelSwitchDetails extends PopsPanelCommonDetails<PopsPanelSwitchDetails> {
|
|
6
|
-
/**
|
|
7
|
-
* (可选)className属性
|
|
8
|
-
* @default ""
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* (可选)自定义元素属性
|
|
13
|
-
* @default {}
|
|
14
|
-
*/
|
|
15
|
-
attributes?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
} | {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}[];
|
|
20
|
-
/**
|
|
21
|
-
* (可选)自定义属性
|
|
22
|
-
* @default {}
|
|
23
|
-
*/
|
|
24
|
-
props?: {
|
|
25
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
26
|
-
};
|
|
27
6
|
/**
|
|
28
7
|
* 显示在左边的文字
|
|
29
8
|
*/
|
|
@@ -3,27 +3,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
3
3
|
* pops.panel的 textarea
|
|
4
4
|
*/
|
|
5
5
|
export interface PopsPanelTextAreaDetails extends PopsPanelCommonDetails<PopsPanelTextAreaDetails> {
|
|
6
|
-
/**
|
|
7
|
-
* (可选)className属性
|
|
8
|
-
* @default ""
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* (可选)自定义元素属性
|
|
13
|
-
* @default {}
|
|
14
|
-
*/
|
|
15
|
-
attributes?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
} | {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}[];
|
|
20
|
-
/**
|
|
21
|
-
* (可选)自定义属性
|
|
22
|
-
* @default {}
|
|
23
|
-
*/
|
|
24
|
-
props?: {
|
|
25
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
26
|
-
};
|
|
27
6
|
/**
|
|
28
7
|
* 显示在左边的文字
|
|
29
8
|
*/
|
|
@@ -10,6 +10,7 @@ import type { PopsPanelDeepMenuDetails } from "./components-deepMenu";
|
|
|
10
10
|
import type { PopsPanelOwnDetails } from "./components-own";
|
|
11
11
|
import type { PopsHeaderCloseButtonDetails } from "../../../types/button";
|
|
12
12
|
import type { PopsPanelSelectMultipleDetails } from "./components-selectMultiple";
|
|
13
|
+
import type { PopsPanelCommonDetails } from "./components-common";
|
|
13
14
|
/** panel的各种类型的配置项 */
|
|
14
15
|
export type PopsPanelFormsTotalDetails = PopsPanelSwitchDetails | PopsPanelSliderDetails | PopsPanelInputDetails | PopsPanelTextAreaDetails | PopsPanelSelectDetails<any> | PopsPanelSelectMultipleDetails<any> | PopsPanelButtonDetails | PopsPanelDeepMenuDetails | PopsPanelOwnDetails;
|
|
15
16
|
/**
|
|
@@ -40,11 +41,11 @@ export interface PopsPanelContentConfig {
|
|
|
40
41
|
*/
|
|
41
42
|
className?: string | string[];
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
+
* 显示的文本,可以是html格式
|
|
44
45
|
*/
|
|
45
46
|
title: string | (() => string);
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* (可选)中间顶部的文本,如果为空,则使用title的值代替
|
|
48
49
|
* @default title
|
|
49
50
|
*/
|
|
50
51
|
headerTitle?: string | (() => string);
|
|
@@ -72,17 +73,11 @@ export interface PopsPanelContentConfig {
|
|
|
72
73
|
/**
|
|
73
74
|
* (可选)自定义元素属性.setAttribute、.getAttribute
|
|
74
75
|
*/
|
|
75
|
-
attributes?:
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
} | {
|
|
78
|
-
[key: string]: any;
|
|
79
|
-
}[];
|
|
76
|
+
attributes?: PopsPanelCommonDetails<any>["attributes"];
|
|
80
77
|
/**
|
|
81
78
|
* (可选)自定义元素内部的属性值
|
|
82
79
|
*/
|
|
83
|
-
props?:
|
|
84
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
85
|
-
};
|
|
80
|
+
props?: PopsPanelCommonDetails<any>["props"];
|
|
86
81
|
/**
|
|
87
82
|
* 子配置
|
|
88
83
|
*/
|
|
@@ -106,13 +101,79 @@ export interface PopsPanelContentConfig {
|
|
|
106
101
|
/**
|
|
107
102
|
* 配置
|
|
108
103
|
*/
|
|
109
|
-
|
|
104
|
+
config: {
|
|
110
105
|
/** 容器配置 */
|
|
111
106
|
asideConfig: PopsPanelContentConfig;
|
|
112
107
|
/** 左侧容器的元素 */
|
|
113
108
|
$asideLiElement: HTMLLIElement;
|
|
114
109
|
}) => void;
|
|
115
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* pops.panel的bottomContent配置信息
|
|
113
|
+
*/
|
|
114
|
+
export interface PopsPanelBottomContentConfig {
|
|
115
|
+
/**
|
|
116
|
+
* (可选)元素的className,值为空的话就不设置
|
|
117
|
+
* @default ""
|
|
118
|
+
*/
|
|
119
|
+
className?: string | string[];
|
|
120
|
+
/**
|
|
121
|
+
* (可选)配置所在位置
|
|
122
|
+
*
|
|
123
|
+
* @default "left"
|
|
124
|
+
*/
|
|
125
|
+
position: "left" | "right";
|
|
126
|
+
/**
|
|
127
|
+
* 显示的文本,可以是html格式
|
|
128
|
+
*/
|
|
129
|
+
text: string | (() => string);
|
|
130
|
+
/**
|
|
131
|
+
* (可选)是否禁用hover的CSS样式
|
|
132
|
+
* @default false
|
|
133
|
+
*/
|
|
134
|
+
disableHoverCSS?: boolean | (() => boolean);
|
|
135
|
+
/**
|
|
136
|
+
* (可选)自定义元素属性.setAttribute、.getAttribute
|
|
137
|
+
* @default {}
|
|
138
|
+
*/
|
|
139
|
+
attributes?: {
|
|
140
|
+
[key: string]: any;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* (可选)自定义元素内部的属性值
|
|
144
|
+
* @default {}
|
|
145
|
+
*/
|
|
146
|
+
props?: {
|
|
147
|
+
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
148
|
+
} | {
|
|
149
|
+
[key: string]: any;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* 该项的点击回调
|
|
153
|
+
*/
|
|
154
|
+
clickCallback?: (
|
|
155
|
+
/**
|
|
156
|
+
* 点击事件
|
|
157
|
+
*/
|
|
158
|
+
event: MouseEvent | PointerEvent) => void;
|
|
159
|
+
/**
|
|
160
|
+
* 该项添加到panel后的回调
|
|
161
|
+
*/
|
|
162
|
+
afterRender?: (
|
|
163
|
+
/**
|
|
164
|
+
* 配置
|
|
165
|
+
*/
|
|
166
|
+
config: {
|
|
167
|
+
/** panel底部区域 */
|
|
168
|
+
$bottomWrapper: HTMLElement;
|
|
169
|
+
/** panel底部区域容器 */
|
|
170
|
+
$bottomContainer: HTMLElement;
|
|
171
|
+
/** panel底部区域左侧容器 */
|
|
172
|
+
$bottomLeftContainer: HTMLElement;
|
|
173
|
+
/** panel底部区域右侧容器 */
|
|
174
|
+
$bottomRightContainer: HTMLElement;
|
|
175
|
+
}) => void;
|
|
176
|
+
}
|
|
116
177
|
/**
|
|
117
178
|
* pops.panel
|
|
118
179
|
*/
|
|
@@ -121,6 +182,10 @@ export interface PopsPanelDetails extends PopsTitleConfig, PopsDragConfig, PopsC
|
|
|
121
182
|
* 内容配置
|
|
122
183
|
*/
|
|
123
184
|
content: PopsPanelContentConfig[];
|
|
185
|
+
/**
|
|
186
|
+
* 底部内容配置
|
|
187
|
+
*/
|
|
188
|
+
bottomContentConfig?: PopsPanelBottomContentConfig[];
|
|
124
189
|
/**
|
|
125
190
|
* 右上角的按钮配置
|
|
126
191
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PopsRightClickMenuDetails } from "./types";
|
|
1
|
+
import type { PopsRightClickMenuDataDetails, PopsRightClickMenuDetails } from "./types";
|
|
2
2
|
export declare const PopsRightClickMenu: {
|
|
3
3
|
init(details: PopsRightClickMenuDetails): {
|
|
4
4
|
guid: string;
|
|
@@ -20941,13 +20941,7 @@ export declare const PopsRightClickMenu: {
|
|
|
20941
20941
|
};
|
|
20942
20942
|
};
|
|
20943
20943
|
targetSelector: string | null;
|
|
20944
|
-
data:
|
|
20945
|
-
icon: import("../../types/icon").PopsIconType | string;
|
|
20946
|
-
iconIsLoading: boolean;
|
|
20947
|
-
text: string | (() => string);
|
|
20948
|
-
callback: (clickEvent: PointerEvent, contextMenuEvent: PointerEvent, liElement: HTMLLIElement, menuListenerRootNode: HTMLElement) => boolean | void | Promise<boolean | void>;
|
|
20949
|
-
item: /*elided*/ any[] | null;
|
|
20950
|
-
}[];
|
|
20944
|
+
data: PopsRightClickMenuDataDetails[];
|
|
20951
20945
|
chileMenuLeftOrRightDistance: number;
|
|
20952
20946
|
childMenuTopOrBottomDistance: number;
|
|
20953
20947
|
className: string;
|