@whitesev/pops 2.2.7 → 2.2.9
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 +2842 -3019
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +2842 -3019
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2842 -3019
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +2842 -3019
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +2842 -3019
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +2842 -3019
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +11 -11
- package/dist/types/src/PopsIcon.d.ts +2 -2
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
- package/dist/types/src/components/tooltip/index.d.ts +2 -2
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +256 -259
- package/dist/types/src/types/animation.d.ts +19 -19
- package/dist/types/src/types/button.d.ts +187 -196
- package/dist/types/src/types/components.d.ts +213 -229
- package/dist/types/src/types/event.d.ts +63 -63
- package/dist/types/src/types/global.d.ts +20 -20
- 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 +114 -122
- package/dist/types/src/types/mask.d.ts +49 -49
- package/dist/types/src/types/position.d.ts +60 -60
- package/package.json +61 -56
- package/LICENSE +0 -674
- package/src/Pops.ts +0 -209
- package/src/PopsAnimation.ts +0 -32
- package/src/PopsCSS.ts +0 -51
- package/src/PopsCore.ts +0 -44
- package/src/PopsIcon.ts +0 -95
- package/src/PopsInst.ts +0 -21
- package/src/components/alert/config.ts +0 -62
- package/src/components/alert/index.css +0 -0
- package/src/components/alert/index.ts +0 -181
- package/src/components/alert/types/index.ts +0 -30
- package/src/components/confirm/config.ts +0 -90
- package/src/components/confirm/index.css +0 -0
- package/src/components/confirm/index.ts +0 -192
- package/src/components/confirm/types/index.ts +0 -17
- package/src/components/drawer/config.ts +0 -89
- package/src/components/drawer/index.css +0 -35
- package/src/components/drawer/index.ts +0 -260
- package/src/components/drawer/types/index.ts +0 -61
- package/src/components/folder/config.ts +0 -147
- package/src/components/folder/folderIcon.ts +0 -28
- package/src/components/folder/index.css +0 -314
- package/src/components/folder/index.ts +0 -1050
- package/src/components/folder/types/index.ts +0 -101
- package/src/components/iframe/config.ts +0 -60
- package/src/components/iframe/index.css +0 -75
- package/src/components/iframe/index.ts +0 -351
- package/src/components/iframe/types/index.ts +0 -146
- package/src/components/loading/config.ts +0 -29
- package/src/components/loading/index.css +0 -66
- package/src/components/loading/index.ts +0 -114
- package/src/components/loading/types/index.ts +0 -40
- package/src/components/panel/config.ts +0 -532
- package/src/components/panel/handlerComponents.ts +0 -3277
- package/src/components/panel/index.css +0 -1293
- package/src/components/panel/index.ts +0 -213
- package/src/components/panel/types/components-button.ts +0 -69
- package/src/components/panel/types/components-common.ts +0 -55
- package/src/components/panel/types/components-deepMenu.ts +0 -85
- package/src/components/panel/types/components-forms.ts +0 -45
- package/src/components/panel/types/components-input.ts +0 -82
- package/src/components/panel/types/components-own.ts +0 -31
- package/src/components/panel/types/components-select.ts +0 -101
- package/src/components/panel/types/components-selectMultiple.ts +0 -133
- package/src/components/panel/types/components-slider.ts +0 -78
- package/src/components/panel/types/components-switch.ts +0 -57
- package/src/components/panel/types/components-textarea.ts +0 -69
- package/src/components/panel/types/index.ts +0 -177
- package/src/components/prompt/config.ts +0 -94
- package/src/components/prompt/index.css +0 -34
- package/src/components/prompt/index.ts +0 -222
- package/src/components/prompt/types/index.ts +0 -55
- package/src/components/rightClickMenu/config.ts +0 -130
- package/src/components/rightClickMenu/index.css +0 -88
- package/src/components/rightClickMenu/index.ts +0 -689
- package/src/components/rightClickMenu/types/index.ts +0 -91
- package/src/components/searchSuggestion/config.ts +0 -59
- package/src/components/searchSuggestion/index.ts +0 -708
- package/src/components/searchSuggestion/types/index.ts +0 -147
- package/src/components/tooltip/config.ts +0 -34
- package/src/components/tooltip/index.css +0 -196
- package/src/components/tooltip/index.ts +0 -655
- package/src/components/tooltip/types/index.ts +0 -125
- package/src/config/CommonCSSClassName.ts +0 -17
- package/src/config/GlobalConfig.ts +0 -80
- package/src/css/animation.css +0 -2245
- package/src/css/button.css +0 -542
- package/src/css/common.css +0 -52
- package/src/css/index.css +0 -254
- package/src/css/ninePalaceGridPosition.css +0 -50
- package/src/css/scrollbar.css +0 -22
- package/src/handler/PopsElementHandler.ts +0 -325
- package/src/handler/PopsHandler.ts +0 -719
- package/src/svg/arrowLeft.svg +0 -4
- package/src/svg/arrowRight.svg +0 -4
- package/src/svg/chromeFilled.svg +0 -14
- package/src/svg/circleClose.svg +0 -8
- package/src/svg/close.svg +0 -5
- package/src/svg/cpu.svg +0 -8
- package/src/svg/delete.svg +0 -5
- package/src/svg/documentCopy.svg +0 -5
- package/src/svg/edit.svg +0 -8
- package/src/svg/eleme.svg +0 -5
- package/src/svg/elemePlus.svg +0 -5
- package/src/svg/headset.svg +0 -5
- package/src/svg/hide.svg +0 -8
- package/src/svg/keyboard.svg +0 -8
- package/src/svg/loading.svg +0 -5
- package/src/svg/max.svg +0 -5
- package/src/svg/min.svg +0 -5
- package/src/svg/mise.svg +0 -5
- package/src/svg/monitor.svg +0 -5
- package/src/svg/next.svg +0 -5
- package/src/svg/picture.svg +0 -8
- package/src/svg/prev.svg +0 -5
- package/src/svg/search.svg +0 -5
- package/src/svg/share.svg +0 -5
- package/src/svg/upload.svg +0 -5
- package/src/svg/videoPause.svg +0 -5
- package/src/svg/videoPlay.svg +0 -5
- package/src/svg/view.svg +0 -5
- package/src/types/PopsDOMUtilsEventType.d.ts +0 -259
- package/src/types/animation.d.ts +0 -19
- package/src/types/button.d.ts +0 -196
- package/src/types/components.d.ts +0 -229
- package/src/types/event.d.ts +0 -63
- package/src/types/global.d.ts +0 -20
- package/src/types/icon.d.ts +0 -32
- package/src/types/inst.d.ts +0 -24
- package/src/types/main.d.ts +0 -122
- package/src/types/mask.d.ts +0 -49
- package/src/types/position.d.ts +0 -60
- package/src/utils/PopsDOMUtils.ts +0 -2649
- package/src/utils/PopsDOMUtilsEventsConfig.ts +0 -6
- package/src/utils/PopsInstanceUtils.ts +0 -801
- package/src/utils/PopsMathUtils.ts +0 -77
- package/src/utils/PopsSafeUtils.ts +0 -24
- package/src/utils/PopsUtils.ts +0 -430
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { PopsCommonConfig } from "../../../types/components";
|
|
2
|
-
import type { PopsIconType } from "../../../types/icon";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* pops.rightClickMenu的右键菜单配置
|
|
6
|
-
*/
|
|
7
|
-
export interface PopsRightClickMenuDataDetails {
|
|
8
|
-
/**
|
|
9
|
-
* svg图标,留空则是没图标
|
|
10
|
-
* @default ""
|
|
11
|
-
*/
|
|
12
|
-
icon?: PopsIconType | string;
|
|
13
|
-
/**
|
|
14
|
-
* 图标是否旋转
|
|
15
|
-
* @default false
|
|
16
|
-
*/
|
|
17
|
-
iconIsLoading?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* 文字
|
|
20
|
-
*/
|
|
21
|
-
text: string | (() => string);
|
|
22
|
-
/**
|
|
23
|
-
* 点击的回调函数
|
|
24
|
-
* @param clickEvent 点击菜单的click事件
|
|
25
|
-
* @param contextMenuEvent 触发的contextmenu事件
|
|
26
|
-
* @param liElement <li>元素
|
|
27
|
-
* @param menuListenerRootNode 右键菜单监听的元素
|
|
28
|
-
* @returns
|
|
29
|
-
* + true(默认) 关闭菜单
|
|
30
|
-
* + false 不关闭菜单
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
callback?: (
|
|
34
|
-
clickEvent: PointerEvent,
|
|
35
|
-
contextMenuEvent: PointerEvent,
|
|
36
|
-
liElement: HTMLLIElement,
|
|
37
|
-
menuListenerRootNode: HTMLElement
|
|
38
|
-
) => boolean | void | Promise<boolean | void>;
|
|
39
|
-
/**
|
|
40
|
-
* 子项配置
|
|
41
|
-
*/
|
|
42
|
-
item?: PopsRightClickMenuDataDetails[] | null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* pops.rightClickMenu
|
|
47
|
-
*/
|
|
48
|
-
export interface PopsRightClickMenuDetails
|
|
49
|
-
extends Pick<
|
|
50
|
-
PopsCommonConfig,
|
|
51
|
-
"useShadowRoot" | "beforeAppendToPageCallBack" | "zIndex" | "style" | "only"
|
|
52
|
-
> {
|
|
53
|
-
/**
|
|
54
|
-
* 目标元素
|
|
55
|
-
* @default document.documentElement
|
|
56
|
-
*/
|
|
57
|
-
target?: HTMLElement | Window | EventTarget | Node;
|
|
58
|
-
/**
|
|
59
|
-
* 目标的子元素选择器,默认为空
|
|
60
|
-
*/
|
|
61
|
-
targetSelector?: string | null;
|
|
62
|
-
/**
|
|
63
|
-
* 右键菜单数据
|
|
64
|
-
*/
|
|
65
|
-
data: PopsRightClickMenuDataDetails[];
|
|
66
|
-
/**
|
|
67
|
-
* 子菜单的左右偏移距离
|
|
68
|
-
* @default 0
|
|
69
|
-
*/
|
|
70
|
-
chileMenuLeftOrRightDistance?: number;
|
|
71
|
-
/**
|
|
72
|
-
* 子菜单的上下偏移距离
|
|
73
|
-
* @default 0
|
|
74
|
-
*/
|
|
75
|
-
childMenuTopOrBottomDistance?: number;
|
|
76
|
-
/**
|
|
77
|
-
* 自定义className,默认为空
|
|
78
|
-
* @default ""
|
|
79
|
-
*/
|
|
80
|
-
className?: string;
|
|
81
|
-
/**
|
|
82
|
-
* 是否启用动画,默认true
|
|
83
|
-
* @default true
|
|
84
|
-
*/
|
|
85
|
-
isAnimation?: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* 是否阻止默认contextmenu事件
|
|
88
|
-
* @default false
|
|
89
|
-
*/
|
|
90
|
-
preventDefault?: boolean;
|
|
91
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { PopsSearchSuggestionDetails } from "./types/index";
|
|
2
|
-
|
|
3
|
-
export const searchSuggestionConfig =
|
|
4
|
-
(): DeepRequired<PopsSearchSuggestionDetails> => {
|
|
5
|
-
return {
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
target: null,
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
inputTarget: null,
|
|
10
|
-
selfDocument: document,
|
|
11
|
-
data: [
|
|
12
|
-
{
|
|
13
|
-
value: "数据1",
|
|
14
|
-
text: "数据1-html",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
value: "数据2",
|
|
18
|
-
text: "数据2-html",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
deleteIcon: {
|
|
22
|
-
enable: true,
|
|
23
|
-
callback(event, liElement, data) {
|
|
24
|
-
console.log("删除当前项", [event, liElement, data]);
|
|
25
|
-
liElement.remove();
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
useShadowRoot: true,
|
|
29
|
-
className: "",
|
|
30
|
-
isAbsolute: true,
|
|
31
|
-
isAnimation: true,
|
|
32
|
-
width: "250px",
|
|
33
|
-
maxHeight: "300px",
|
|
34
|
-
followTargetWidth: true,
|
|
35
|
-
topDistance: 0,
|
|
36
|
-
position: "auto",
|
|
37
|
-
positionTopToReverse: true,
|
|
38
|
-
zIndex: 10000,
|
|
39
|
-
searchingTip: "正在搜索中...",
|
|
40
|
-
toSearhNotResultHTML: '<li data-none="true">暂无其它数据</li>',
|
|
41
|
-
toHideWithNotResult: false,
|
|
42
|
-
followPosition: "target",
|
|
43
|
-
getItemHTML(item) {
|
|
44
|
-
return item.text ?? item;
|
|
45
|
-
},
|
|
46
|
-
async getData(value) {
|
|
47
|
-
console.log("当前输入框的值是:", value);
|
|
48
|
-
return [];
|
|
49
|
-
},
|
|
50
|
-
itemClickCallBack(event, liElement, data) {
|
|
51
|
-
console.log("item项的点击回调", [event, liElement, data]);
|
|
52
|
-
this.inputTarget.value = data.value;
|
|
53
|
-
},
|
|
54
|
-
selectCallBack(event, liElement, data) {
|
|
55
|
-
console.log("item项的选中回调", [event, liElement, data]);
|
|
56
|
-
},
|
|
57
|
-
style: "",
|
|
58
|
-
};
|
|
59
|
-
};
|