@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
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
1
|
+
import type { PopsAlertConfig } from "./components/alert/types";
|
|
2
|
+
import type { PopsConfirmConfig } from "./components/confirm/types";
|
|
3
|
+
import type { PopsDrawerConfig } from "./components/drawer/types";
|
|
4
|
+
import type { PopsFolderConfig } from "./components/folder/types";
|
|
5
|
+
import type { PopsIframeConfig } from "./components/iframe/types";
|
|
6
|
+
import type { PopsLoadingConfig } from "./components/loading/types";
|
|
7
|
+
import type { PopsPanelConfig } from "./components/panel/types";
|
|
8
|
+
import type { PopsPromptConfig } from "./components/prompt/types/index";
|
|
9
|
+
import type { PopsRightClickMenuConfig } from "./components/rightClickMenu/types";
|
|
10
|
+
import type { PopsSearchSuggestionConfig } from "./components/searchSuggestion/types/index";
|
|
11
|
+
import type { PopsToolTipConfig } from "./components/tooltip/types/index";
|
|
12
12
|
declare class Pops {
|
|
13
13
|
/** 配置 */
|
|
14
14
|
config: {
|
|
@@ -34,16 +34,17 @@ declare class Pops {
|
|
|
34
34
|
};
|
|
35
35
|
/** icon图标的svg代码 */
|
|
36
36
|
iconSVG: {
|
|
37
|
-
|
|
37
|
+
picture: string;
|
|
38
|
+
search: string;
|
|
38
39
|
min: string;
|
|
39
|
-
max: string;
|
|
40
40
|
mise: string;
|
|
41
|
+
max: string;
|
|
41
42
|
close: string;
|
|
42
43
|
edit: string;
|
|
43
44
|
share: string;
|
|
44
45
|
delete: string;
|
|
45
|
-
search: string;
|
|
46
46
|
upload: string;
|
|
47
|
+
loading: string;
|
|
47
48
|
next: string;
|
|
48
49
|
prev: string;
|
|
49
50
|
eleme: string;
|
|
@@ -55,7 +56,6 @@ declare class Pops {
|
|
|
55
56
|
headset: string;
|
|
56
57
|
monitor: string;
|
|
57
58
|
documentCopy: string;
|
|
58
|
-
picture: string;
|
|
59
59
|
circleClose: string;
|
|
60
60
|
view: string;
|
|
61
61
|
hide: string;
|
|
@@ -69,16 +69,16 @@ declare class Pops {
|
|
|
69
69
|
};
|
|
70
70
|
/** 存储已创建的元素 */
|
|
71
71
|
instData: {
|
|
72
|
-
iframe: import("./types/inst").
|
|
73
|
-
loading: import("./types/inst").
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
panel: import("./types/inst").
|
|
81
|
-
rightClickMenu: import("./types/inst").
|
|
72
|
+
iframe: import("./types/inst").PopsInstGeneralConfig[];
|
|
73
|
+
loading: import("./types/inst").PopsInstGeneralConfig[];
|
|
74
|
+
alert: import("./types/inst").PopsInstGeneralConfig[];
|
|
75
|
+
confirm: import("./types/inst").PopsInstGeneralConfig[];
|
|
76
|
+
prompt: import("./types/inst").PopsInstGeneralConfig[];
|
|
77
|
+
tooltip: import("./types/inst").PopsInstGeneralConfig[];
|
|
78
|
+
drawer: import("./types/inst").PopsInstGeneralConfig[];
|
|
79
|
+
folder: import("./types/inst").PopsInstGeneralConfig[];
|
|
80
|
+
panel: import("./types/inst").PopsInstGeneralConfig[];
|
|
81
|
+
rightClickMenu: import("./types/inst").PopsInstGeneralConfig[];
|
|
82
82
|
};
|
|
83
83
|
/** 禁止滚动 */
|
|
84
84
|
forbiddenScroll: {
|
|
@@ -102,6 +102,7 @@ declare class Pops {
|
|
|
102
102
|
clearTimeout(timeId: number | undefined): void;
|
|
103
103
|
setInterval(callback: (...args: any[]) => any, timeout?: number): number;
|
|
104
104
|
clearInterval(timeId: number | undefined): void;
|
|
105
|
+
setArray<T>(target: T, key: keyof T, newArr: any[]): void;
|
|
105
106
|
};
|
|
106
107
|
/** pops使用的DOM工具类 */
|
|
107
108
|
DOMUtils: {
|
|
@@ -196,11 +197,11 @@ declare class Pops {
|
|
|
196
197
|
isOverMaxZIndex: boolean;
|
|
197
198
|
};
|
|
198
199
|
getMaxZIndex(deviation?: number): number;
|
|
199
|
-
removeInstance(instConfigList: import("./types/inst").
|
|
200
|
-
hide(config:
|
|
201
|
-
show(config:
|
|
202
|
-
close(config:
|
|
203
|
-
drag(
|
|
200
|
+
removeInstance(instConfigList: import("./types/inst").PopsInstGeneralConfig[][], guid: string, isAll?: boolean): import("./types/inst").PopsInstGeneralConfig[][];
|
|
201
|
+
hide(config: PopsAlertConfig | PopsDrawerConfig | PopsPromptConfig | PopsConfirmConfig | PopsIframeConfig | PopsLoadingConfig | PopsPanelConfig | PopsFolderConfig, popsType: import("./types/main").PopsInstStoreType, instConfigList: import("./types/inst").PopsInstGeneralConfig[], guid: string, $anim: HTMLElement, $mask?: HTMLElement): Promise<void>;
|
|
202
|
+
show(config: PopsAlertConfig | PopsDrawerConfig | PopsPromptConfig | PopsConfirmConfig | PopsIframeConfig | PopsLoadingConfig | PopsPanelConfig | PopsFolderConfig, popsType: import("./types/main").PopsInstStoreType, instConfigList: import("./types/inst").PopsInstGeneralConfig[], guid: string, $anim: HTMLElement, $mask?: HTMLElement): Promise<void>;
|
|
203
|
+
close(config: PopsAlertConfig | PopsDrawerConfig | PopsPromptConfig | PopsConfirmConfig | PopsIframeConfig | PopsLoadingConfig | PopsPanelConfig | PopsFolderConfig, popsType: string, instConfigList: import("./types/inst").PopsInstGeneralConfig[], guid: string, $anim: HTMLElement): Promise<void>;
|
|
204
|
+
drag($move: HTMLElement, options: {
|
|
204
205
|
dragElement: HTMLElement;
|
|
205
206
|
limit: boolean;
|
|
206
207
|
triggerClick?: boolean;
|
|
@@ -236,9 +237,12 @@ declare class Pops {
|
|
|
236
237
|
$panelBottomLeftContainer: HTMLElement;
|
|
237
238
|
$panelBottomRightContainer: HTMLElement;
|
|
238
239
|
};
|
|
239
|
-
$
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
$data: {
|
|
241
|
+
nodeStoreConfigKey: string;
|
|
242
|
+
};
|
|
243
|
+
$config: Required<PopsPanelConfig>;
|
|
244
|
+
init(data: {
|
|
245
|
+
config: Required<PopsPanelConfig>;
|
|
242
246
|
$el: {
|
|
243
247
|
$pops: HTMLElement;
|
|
244
248
|
$content: HTMLElement;
|
|
@@ -257,24 +261,24 @@ declare class Pops {
|
|
|
257
261
|
setAsideItemIsVisited($el: HTMLElement): void;
|
|
258
262
|
setElementAttributes($el: HTMLElement, attributes?: any): void;
|
|
259
263
|
setElementProps($el: HTMLElement, props?: any): void;
|
|
260
|
-
setElementClassName($el: HTMLElement, className?: import("./components/panel/types/components-common").
|
|
264
|
+
setElementClassName($el: HTMLElement, className?: import("./components/panel/types/components-common").PopsPanelGeneralConfig<any>["className"]): void;
|
|
261
265
|
createBottomItem(bottomItemConfig: import("./components/panel/types").PopsPanelBottomContentConfig): HTMLLIElement;
|
|
262
266
|
setBottomItemClickEvent($bottomItem: HTMLElement, bottomItemConfig: import("./components/panel/types").PopsPanelBottomContentConfig): void;
|
|
263
267
|
createAsideItem(asideConfig: import("./components/panel/types").PopsPanelContentConfig): HTMLLIElement;
|
|
264
|
-
createSectionContainerItem_switch(
|
|
265
|
-
createSectionContainerItem_slider(
|
|
266
|
-
createSectionContainerItem_slider_new(
|
|
267
|
-
createSectionContainerItem_input(
|
|
268
|
-
createSectionContainerItem_textarea(
|
|
269
|
-
createSectionContainerItem_select(
|
|
270
|
-
|
|
271
|
-
createSectionContainerItem_button(
|
|
272
|
-
createSectionContainerItem_deepMenu(
|
|
273
|
-
createSectionContainerItem_own(
|
|
274
|
-
createSectionContainerItem(
|
|
275
|
-
createSectionContainerItem_forms(
|
|
268
|
+
createSectionContainerItem_switch(viewConfig: import("./components/panel/types/components-switch").PopsPanelSwitchConfig): HTMLLIElement;
|
|
269
|
+
createSectionContainerItem_slider(viewConfig: import("./components/panel/types/components-slider").PopsPanelSliderConfig): HTMLLIElement;
|
|
270
|
+
createSectionContainerItem_slider_new(viewConfig: import("./components/panel/types/components-slider").PopsPanelSliderConfig): HTMLLIElement;
|
|
271
|
+
createSectionContainerItem_input(viewConfig: import("./components/panel/types/components-input").PopsPanelInputConfig): HTMLLIElement;
|
|
272
|
+
createSectionContainerItem_textarea(viewConfig: import("./components/panel/types/components-textarea").PopsPanelTextAreaConfig): HTMLLIElement;
|
|
273
|
+
createSectionContainerItem_select(viewConfig: import("./components/panel/types/components-select").PopsPanelSelectConfig<any>): HTMLLIElement;
|
|
274
|
+
createSectionContainerItem_select_multiple(viewConfig: import("./components/panel/types/components-selectMultiple").PopsPanelSelectMultipleConfig<any>): HTMLLIElement;
|
|
275
|
+
createSectionContainerItem_button(viewConfig: import("./components/panel/types/components-button").PopsPanelButtonConfig): HTMLLIElement;
|
|
276
|
+
createSectionContainerItem_deepMenu(viewConfig: import("./components/panel/types/components-deepMenu").PopsPanelDeepViewConfig): HTMLLIElement;
|
|
277
|
+
createSectionContainerItem_own(viewConfig: import("./components/panel/types/components-own").PopsPanelOwnConfig): HTMLLIElement;
|
|
278
|
+
createSectionContainerItem(viewConfig: import("./components/panel/types").PopsPanelViewConfig): HTMLLIElement | undefined;
|
|
279
|
+
createSectionContainerItem_forms(viewConfig: import("./components/panel/types").PopsPanelContentConfig | import("./components/panel/types/components-container").PopsPanelContainerConfig): void;
|
|
276
280
|
triggerRenderRightContainer($container: HTMLElement): void;
|
|
277
|
-
uListContainerAddItem(
|
|
281
|
+
uListContainerAddItem(viewConfig: import("./components/panel/types").PopsPanelViewConfig, containerOptions: Omit<import("./components/panel/types/components-common").PopsPanelRightAsideContainerConfig, "target">): void;
|
|
278
282
|
setAsideItemClickEvent($asideItem: HTMLElement, asideConfig: import("./components/panel/types").PopsPanelContentConfig): void;
|
|
279
283
|
};
|
|
280
284
|
};
|
|
@@ -297,11 +301,11 @@ declare class Pops {
|
|
|
297
301
|
config: {
|
|
298
302
|
style?: string | (() => string) | null;
|
|
299
303
|
zIndex?: (number | (() => number) | null) | (string | (() => string) | null);
|
|
300
|
-
} & Partial<import("./types/components").
|
|
304
|
+
} & Partial<import("./types/components").PopsGeneralConfig> & Partial<import("./types/components").PopsDragConfig>;
|
|
301
305
|
setGlobalConfig(config: {
|
|
302
306
|
style?: string | (() => string) | null;
|
|
303
307
|
zIndex?: (number | (() => number) | null) | (string | (() => string) | null);
|
|
304
|
-
} & Partial<import("./types/components").
|
|
308
|
+
} & Partial<import("./types/components").PopsGeneralConfig> & Partial<import("./types/components").PopsDragConfig>): void;
|
|
305
309
|
getGlobalConfig(): {
|
|
306
310
|
style?: string | undefined;
|
|
307
311
|
zIndex?: string | number | undefined;
|
|
@@ -312,7 +316,7 @@ declare class Pops {
|
|
|
312
316
|
height?: string | undefined;
|
|
313
317
|
position?: import("./types/position").PopsPosition | undefined;
|
|
314
318
|
animation?: import("./types/animation").PopsAnimation | undefined;
|
|
315
|
-
mask?: import("./types/mask").
|
|
319
|
+
mask?: import("./types/mask").PopsMaskConfig | undefined;
|
|
316
320
|
forbiddenScroll?: boolean | undefined;
|
|
317
321
|
beforeAppendToPageCallBack?: void;
|
|
318
322
|
drag?: boolean | undefined;
|
|
@@ -324,39 +328,37 @@ declare class Pops {
|
|
|
324
328
|
};
|
|
325
329
|
/**
|
|
326
330
|
* 普通信息框
|
|
327
|
-
* @param
|
|
331
|
+
* @param config 配置
|
|
328
332
|
*/
|
|
329
|
-
alert: (
|
|
333
|
+
alert: (config: PopsAlertConfig) => Omit<import("./types/event").PopsEventConfig, "function" | "type">;
|
|
330
334
|
/**
|
|
331
335
|
* 询问框
|
|
332
|
-
* @param
|
|
336
|
+
* @param config 配置
|
|
333
337
|
*/
|
|
334
|
-
confirm: (
|
|
338
|
+
confirm: (config: PopsConfirmConfig) => Omit<import("./types/event").PopsEventConfig, "function" | "type">;
|
|
335
339
|
/**
|
|
336
340
|
* 输入框
|
|
337
|
-
* @param
|
|
341
|
+
* @param config 配置
|
|
338
342
|
*/
|
|
339
|
-
prompt: (
|
|
343
|
+
prompt: (config: PopsPromptConfig) => Omit<import("./types/event").PopsEventConfig, "function" | "type">;
|
|
340
344
|
/**
|
|
341
345
|
* 加载层
|
|
342
|
-
* @param
|
|
346
|
+
* @param config 配置
|
|
343
347
|
*/
|
|
344
|
-
loading: (
|
|
348
|
+
loading: (config: PopsLoadingConfig) => Omit<Omit<import("./types/event").PopsEventConfig, "$shadowContainer" | "$shadowRoot">, "function" | "type">;
|
|
345
349
|
/**
|
|
346
350
|
* iframe层
|
|
347
|
-
* @param
|
|
351
|
+
* @param config 配置
|
|
348
352
|
*/
|
|
349
|
-
iframe: (
|
|
350
|
-
iframeElement: HTMLIFrameElement;
|
|
351
|
-
}, "function" | "type">;
|
|
353
|
+
iframe: (config: PopsIframeConfig) => Omit<import("./components/iframe/types").PopsIframeClickEventConfig, "function" | "type">;
|
|
352
354
|
/**
|
|
353
355
|
* 提示框
|
|
354
|
-
* @param
|
|
356
|
+
* @param config 配置
|
|
355
357
|
*/
|
|
356
|
-
tooltip: (
|
|
358
|
+
tooltip: (config: PopsToolTipConfig) => {
|
|
357
359
|
guid: string;
|
|
358
360
|
config: {
|
|
359
|
-
target: HTMLElement;
|
|
361
|
+
$target: HTMLElement;
|
|
360
362
|
content: string | (() => string);
|
|
361
363
|
isDiffContent: boolean;
|
|
362
364
|
position: import("./components/tooltip/types/index").PopsTooltipPosition;
|
|
@@ -369,21 +371,6 @@ declare class Pops {
|
|
|
369
371
|
eventOption: {
|
|
370
372
|
once: boolean;
|
|
371
373
|
passive: boolean;
|
|
372
|
-
signal: {
|
|
373
|
-
readonly aborted: boolean;
|
|
374
|
-
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
|
375
|
-
readonly reason: any;
|
|
376
|
-
throwIfAborted: () => void;
|
|
377
|
-
addEventListener: {
|
|
378
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
379
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
380
|
-
};
|
|
381
|
-
removeEventListener: {
|
|
382
|
-
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
383
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
384
|
-
};
|
|
385
|
-
dispatchEvent: (event: Event) => boolean;
|
|
386
|
-
};
|
|
387
374
|
capture: boolean;
|
|
388
375
|
};
|
|
389
376
|
showBeforeCallBack: ($toolTip: HTMLElement) => false | void;
|
|
@@ -405,25 +392,24 @@ declare class Pops {
|
|
|
405
392
|
};
|
|
406
393
|
/**
|
|
407
394
|
* 抽屉
|
|
408
|
-
* @param
|
|
395
|
+
* @param config 配置
|
|
409
396
|
*/
|
|
410
|
-
drawer: (
|
|
397
|
+
drawer: (config: PopsDrawerConfig) => Omit<import("./types/event").PopsEventConfig, "function" | "type">;
|
|
411
398
|
/**
|
|
412
399
|
* 文件夹
|
|
413
|
-
* @param
|
|
400
|
+
* @param config 配置
|
|
414
401
|
*/
|
|
415
|
-
folder: (
|
|
402
|
+
folder: (config: PopsFolderConfig) => Omit<import("./types/event").PopsEventConfig, "function" | "type">;
|
|
416
403
|
/**
|
|
417
404
|
* 配置面板
|
|
418
|
-
* @param
|
|
405
|
+
* @param config 配置
|
|
419
406
|
*/
|
|
420
|
-
panel: (
|
|
407
|
+
panel: (config: PopsPanelConfig) => {
|
|
421
408
|
addEventListener: <K extends keyof import("./components/panel/types").PopsPanelEventType>(event: K, listener: (evt: CustomEvent<import("./components/panel/types").PopsPanelEventType[K]>) => void, options?: boolean | EventListenerOptions) => void;
|
|
422
409
|
removeEventListener: <K extends keyof import("./components/panel/types").PopsPanelEventType>(event: K, listener: (evt: CustomEvent<import("./components/panel/types").PopsPanelEventType[K]>) => void, options?: boolean | EventListenerOptions) => void;
|
|
423
410
|
close: () => Promise<void>;
|
|
424
411
|
hide: () => Promise<void>;
|
|
425
412
|
show: () => Promise<void>;
|
|
426
|
-
guid: string;
|
|
427
413
|
$shadowContainer: HTMLDivElement;
|
|
428
414
|
$shadowRoot: ShadowRoot | HTMLElement;
|
|
429
415
|
$el: HTMLDivElement;
|
|
@@ -431,36 +417,42 @@ declare class Pops {
|
|
|
431
417
|
$pops: HTMLDivElement;
|
|
432
418
|
$mask?: HTMLDivElement | undefined;
|
|
433
419
|
mode: import("./types/main").PopsType;
|
|
420
|
+
guid: string;
|
|
434
421
|
};
|
|
435
422
|
/**
|
|
436
423
|
* 右键菜单
|
|
437
|
-
* @param
|
|
424
|
+
* @param config 配置
|
|
438
425
|
*/
|
|
439
|
-
rightClickMenu: (
|
|
426
|
+
rightClickMenu: (config: PopsRightClickMenuConfig) => {
|
|
440
427
|
guid: string;
|
|
441
|
-
config: DeepRequired<
|
|
428
|
+
config: DeepRequired<PopsRightClickMenuConfig>;
|
|
442
429
|
addWindowCheckClickListener: () => void;
|
|
443
430
|
removeWindowCheckClickListener: () => void;
|
|
444
|
-
addContextMenuEvent: (target:
|
|
431
|
+
addContextMenuEvent: (target: PopsRightClickMenuConfig["$target"], selector?: string) => void;
|
|
445
432
|
removeContextMenuEvent: (target: HTMLElement | typeof globalThis | Window, selector?: string) => void;
|
|
446
433
|
removeInitEventListener: {
|
|
447
434
|
contextMenu(): void;
|
|
448
435
|
windowClick(): void;
|
|
449
436
|
};
|
|
450
437
|
PopsContextMenu: {
|
|
451
|
-
|
|
438
|
+
$data: {
|
|
439
|
+
menuDataKey: string;
|
|
440
|
+
};
|
|
441
|
+
$el: {
|
|
442
|
+
$root: HTMLElement;
|
|
443
|
+
};
|
|
452
444
|
windowCheckClickEvent(event: MouseEvent | PointerEvent): void;
|
|
453
445
|
shadowRootCheckClickEvent(event: MouseEvent | PointerEvent): void;
|
|
454
446
|
addWindowCheckClickListener(): void;
|
|
455
447
|
removeWindowCheckClickListener(): void;
|
|
456
|
-
contextMenuEvent(event: PointerEvent, selectorTarget: NonNullable<
|
|
457
|
-
addContextMenuEvent(target:
|
|
448
|
+
contextMenuEvent(event: PointerEvent, selectorTarget: NonNullable<PopsRightClickMenuConfig["$target"]>): void;
|
|
449
|
+
addContextMenuEvent(target: PopsRightClickMenuConfig["$target"], selector?: string): void;
|
|
458
450
|
removeContextMenuEvent(target: HTMLElement | typeof globalThis | Window, selector?: string): void;
|
|
459
451
|
animationCloseMenu($menu: HTMLElement): void;
|
|
460
|
-
closeAllMenu(
|
|
452
|
+
closeAllMenu($root: HTMLElement): void;
|
|
461
453
|
createMenuContainerElement(isChildren: boolean): HTMLDivElement;
|
|
462
454
|
getMenuZIndex(): number;
|
|
463
|
-
getOffset(
|
|
455
|
+
getOffset($menu: HTMLElement, mousePosition: {
|
|
464
456
|
x: number;
|
|
465
457
|
y: number;
|
|
466
458
|
}, parentInfo?: {
|
|
@@ -472,11 +464,11 @@ declare class Pops {
|
|
|
472
464
|
bottom: number;
|
|
473
465
|
left: number;
|
|
474
466
|
};
|
|
475
|
-
showMenu(menuEvent: PointerEvent,
|
|
467
|
+
showMenu(menuEvent: PointerEvent, dataConfig: import("./components/rightClickMenu/types").PopsRightClickMenuDataConfig[], $listenerRootNode: NonNullable<PopsRightClickMenuConfig["$target"]>): HTMLDivElement;
|
|
476
468
|
showClildMenu(menuEvent: PointerEvent, posInfo: {
|
|
477
469
|
clientX: number;
|
|
478
470
|
clientY: number;
|
|
479
|
-
},
|
|
471
|
+
}, dataConfig: import("./components/rightClickMenu/types").PopsRightClickMenuDataConfig[], $root: HTMLDivElement, $targetLi: HTMLLIElement, $listenerRootNode: NonNullable<PopsRightClickMenuConfig["$target"]>): HTMLDivElement;
|
|
480
472
|
handlerShowMenuCSS($menu: HTMLElement, posInfo: {
|
|
481
473
|
clientX: number;
|
|
482
474
|
clientY: number;
|
|
@@ -484,14 +476,14 @@ declare class Pops {
|
|
|
484
476
|
$menu: HTMLElement;
|
|
485
477
|
$parentItem: HTMLElement;
|
|
486
478
|
}): void;
|
|
487
|
-
addMenuLiELement(menuEvent: PointerEvent,
|
|
479
|
+
addMenuLiELement(menuEvent: PointerEvent, $root: HTMLDivElement, $menu: HTMLDivElement, dataConfig: import("./components/rightClickMenu/types").PopsRightClickMenuDataConfig[], $listenerRootNode: NonNullable<PopsRightClickMenuConfig["$target"]>): void;
|
|
488
480
|
};
|
|
489
481
|
};
|
|
490
482
|
/**
|
|
491
483
|
* 搜索建议
|
|
492
484
|
*
|
|
493
485
|
* 注意:调用后需要主动调用.init()和.setAllEvent()进行初始化
|
|
494
|
-
* @param
|
|
486
|
+
* @param config 配置
|
|
495
487
|
* @example
|
|
496
488
|
* let $input = document.querySelector("#input");
|
|
497
489
|
* let searchSuggestion = pops.searchSuggestion({
|
|
@@ -504,11 +496,13 @@ declare class Pops {
|
|
|
504
496
|
* searchSuggestion.init();
|
|
505
497
|
* searchSuggestion.setAllEvent();
|
|
506
498
|
*/
|
|
507
|
-
searchSuggestion: <T = any>(
|
|
499
|
+
searchSuggestion: <T = any>(config: PopsSearchSuggestionConfig<T>) => {
|
|
508
500
|
selfDocument: Document | ShadowRoot | (Document | ShadowRoot)[];
|
|
509
501
|
$el: {
|
|
510
502
|
root: HTMLElement;
|
|
511
|
-
$
|
|
503
|
+
$dropdownWrapper: HTMLElement;
|
|
504
|
+
$dropdownContainer: HTMLUListElement;
|
|
505
|
+
$arrow: HTMLDivElement;
|
|
512
506
|
$dynamicCSS: HTMLStyleElement;
|
|
513
507
|
};
|
|
514
508
|
$evt: {
|
|
@@ -516,8 +510,9 @@ declare class Pops {
|
|
|
516
510
|
};
|
|
517
511
|
$data: {
|
|
518
512
|
isEmpty: boolean;
|
|
513
|
+
storeNodeHandlerKey: string;
|
|
519
514
|
};
|
|
520
|
-
init(
|
|
515
|
+
init($parent?: HTMLElement): void;
|
|
521
516
|
initEl(): void;
|
|
522
517
|
getData(): import("./components/searchSuggestion/types/index").PopsSearchSuggestionData<T>[];
|
|
523
518
|
setData(data: import("./components/searchSuggestion/types/index").PopsSearchSuggestionData<T>[]): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsInstGeneralConfig } from "./types/inst";
|
|
2
2
|
import type { PopsInstStoreType } from "./types/main";
|
|
3
3
|
/**
|
|
4
4
|
* 弹窗实例数据
|
|
5
5
|
*/
|
|
6
6
|
export declare const PopsInstData: {
|
|
7
|
-
[key in PopsInstStoreType]:
|
|
7
|
+
[key in PopsInstStoreType]: PopsInstGeneralConfig[];
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsAlertConfig } from "./types";
|
|
2
2
|
export declare const PopsAlert: {
|
|
3
|
-
init(
|
|
3
|
+
init(__config__: PopsAlertConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
|
|
4
4
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig,
|
|
2
|
-
import type {
|
|
1
|
+
import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsGeneralConfig, PopsButtonConfig } from "../../../types/components";
|
|
2
|
+
import type { PopsGlobalButtonConfig, PopsButtonConfigAnyType } from "../../../types/button";
|
|
3
3
|
/**
|
|
4
4
|
* pops.alert
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface PopsAlertConfig extends PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsGeneralConfig {
|
|
7
7
|
/**
|
|
8
8
|
* 按钮配置
|
|
9
9
|
*/
|
|
@@ -11,6 +11,6 @@ export interface PopsAlertDetails extends PopsTitleConfig, PopsContentConfig, Po
|
|
|
11
11
|
/**
|
|
12
12
|
* 确定按钮
|
|
13
13
|
*/
|
|
14
|
-
ok?: Partial<
|
|
14
|
+
ok?: Partial<PopsGlobalButtonConfig | PopsButtonConfigAnyType>;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsConfirmConfig } from "./types";
|
|
2
2
|
export declare const PopsConfirm: {
|
|
3
|
-
init(
|
|
3
|
+
init(__config__: PopsConfirmConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
|
|
4
4
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig,
|
|
1
|
+
import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsGeneralConfig, PopsMoreButtonConfig } from "../../../types/components";
|
|
2
2
|
/**
|
|
3
3
|
* pops.confirm
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface PopsConfirmConfig extends PopsTitleConfig, PopsContentConfig, PopsMoreButtonConfig, PopsDragConfig, PopsGeneralConfig {
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsDrawerConfig } from "./types";
|
|
2
2
|
export declare const PopsDrawer: {
|
|
3
|
-
init(
|
|
3
|
+
init(__config__: PopsDrawerConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
|
|
4
4
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { PopsTitleConfig, PopsContentConfig,
|
|
1
|
+
import type { PopsTitleConfig, PopsContentConfig, PopsGeneralConfig, PopsMoreButtonConfig } from "../../../types/components";
|
|
2
2
|
/**
|
|
3
3
|
* pops.drawer
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface PopsDrawerConfig extends PopsContentConfig, PopsMoreButtonConfig, Omit<PopsGeneralConfig, "width" | "height" | "position" | "animation"> {
|
|
6
6
|
/**
|
|
7
7
|
* 标题
|
|
8
8
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsFolderConfig } from "./types";
|
|
2
2
|
export declare const PopsFolder: {
|
|
3
|
-
init(
|
|
3
|
+
init(__config__: PopsFolderConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
|
|
4
4
|
};
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
import type { PopsTitleConfig, PopsDragConfig,
|
|
1
|
+
import type { PopsTitleConfig, PopsDragConfig, PopsGeneralConfig, PopsMoreButtonConfig } from "../../../types/components";
|
|
2
|
+
/**
|
|
3
|
+
* pops.folder的下载配置选项
|
|
4
|
+
*/
|
|
5
|
+
export type PopsFolderDownloadOption = {
|
|
6
|
+
/**
|
|
7
|
+
* 是否点击触发下载
|
|
8
|
+
*
|
|
9
|
+
* + true:根据设置的`mode`值来选择下载方式
|
|
10
|
+
* + false:不触发下载
|
|
11
|
+
*/
|
|
12
|
+
autoDownload: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 触发下载后会根据提供的url链接进行下载
|
|
15
|
+
*/
|
|
16
|
+
url: string;
|
|
17
|
+
/**
|
|
18
|
+
* 下载方式
|
|
19
|
+
*
|
|
20
|
+
* + a:使用a标签进行下载
|
|
21
|
+
* + aBlank:使用a标签进行下载(添加属性`target="_blank"`)
|
|
22
|
+
* + iframe:使用iframe进行下载
|
|
23
|
+
* + open:使用window.open进行下载
|
|
24
|
+
* + openBlank:使用window.open进行下载(添加参数`_blank`)
|
|
25
|
+
*
|
|
26
|
+
* @default "aBlank"
|
|
27
|
+
*/
|
|
28
|
+
mode?: "a" | "aBlank" | "iframe" | "open" | "openBlank";
|
|
29
|
+
};
|
|
2
30
|
/**
|
|
3
31
|
* pops.folder的folder配置信息
|
|
4
32
|
*/
|
|
@@ -34,16 +62,12 @@ export interface PopsFolderDataConfig {
|
|
|
34
62
|
/**
|
|
35
63
|
* 点击事件
|
|
36
64
|
*/
|
|
37
|
-
clickEvent?: (event: MouseEvent | PointerEvent, config: PopsFolderDataConfig) =>
|
|
38
|
-
autoDownload: boolean;
|
|
39
|
-
url: string;
|
|
40
|
-
mode: "a" | "aBlank" | "iframe" | "open" | "openBlank";
|
|
41
|
-
} | null | undefined | void | PopsFolderDataConfig[]> | null | undefined | void | PopsFolderDataConfig[];
|
|
65
|
+
clickEvent?: (event: MouseEvent | PointerEvent, config: PopsFolderDataConfig) => IPromise<PopsFolderDownloadOption | PopsFolderDataConfig[] | null | undefined | void>;
|
|
42
66
|
}
|
|
43
67
|
/**
|
|
44
68
|
* pops.folder
|
|
45
69
|
*/
|
|
46
|
-
export interface
|
|
70
|
+
export interface PopsFolderConfig extends PopsTitleConfig, PopsDragConfig, PopsMoreButtonConfig, PopsGeneralConfig {
|
|
47
71
|
/**
|
|
48
72
|
* 排序
|
|
49
73
|
*/
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PopsIframeDetails } from "./types";
|
|
1
|
+
import type { PopsIframeClickEventConfig, PopsIframeConfig } from "./types";
|
|
3
2
|
export declare const PopsIframe: {
|
|
4
|
-
init(
|
|
5
|
-
iframeElement: HTMLIFrameElement;
|
|
6
|
-
}, "function" | "type">;
|
|
3
|
+
init(__config__: PopsIframeConfig): Omit<PopsIframeClickEventConfig, "function" | "type">;
|
|
7
4
|
};
|