@whitesev/pops 1.3.0 → 1.4.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 +36 -17
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +36 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +36 -17
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +36 -17
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +36 -17
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +36 -17
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +2 -2
- package/dist/types/src/handler/PopsHandler.d.ts +2 -2
- package/dist/types/src/types/main.d.ts +31 -11
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +4 -4
- package/package.json +4 -1
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -140,9 +140,9 @@ declare class Pops {
|
|
|
140
140
|
};
|
|
141
141
|
/** pops创建的实例使用的工具类 */
|
|
142
142
|
InstanceUtils: {
|
|
143
|
-
getPopsMaxZIndex(
|
|
143
|
+
getPopsMaxZIndex(deviation?: number): {
|
|
144
144
|
zIndex: number;
|
|
145
|
-
animElement: HTMLDivElement;
|
|
145
|
+
animElement: HTMLDivElement | null;
|
|
146
146
|
};
|
|
147
147
|
getKeyFrames(sheet: CSSStyleSheet): {};
|
|
148
148
|
removeInstance(moreLayerConfigList: PopsLayerCommonConfig[][], guid: string, isAll?: boolean): PopsLayerCommonConfig[][];
|
|
@@ -8,7 +8,7 @@ import type { PopsPanelDetails } from "../components/panel/indexType";
|
|
|
8
8
|
import type { PopsPromptDetails } from "../components/prompt/indexType";
|
|
9
9
|
import { PopsEventDetails, PopsHandlerEventDetails } from "../types/event";
|
|
10
10
|
import { PopsLayerCommonConfig } from "../types/layer";
|
|
11
|
-
import type { PopsLayerMode, PopsMode, PopsType } from "../types/main";
|
|
11
|
+
import type { PopsAllDetails, PopsLayerMode, PopsMode, PopsType } from "../types/main";
|
|
12
12
|
export declare const PopsHandler: {
|
|
13
13
|
/**
|
|
14
14
|
* 创建shadow
|
|
@@ -212,7 +212,7 @@ export declare const PopsHandler: {
|
|
|
212
212
|
* @param type 当前弹窗类型
|
|
213
213
|
* @param config 配置
|
|
214
214
|
*/
|
|
215
|
-
handleOnly<T extends
|
|
215
|
+
handleOnly<T extends Required<PopsAllDetails[keyof PopsAllDetails]>>(type: PopsMode, config: T): T;
|
|
216
216
|
/**
|
|
217
217
|
* 处理把已创建的元素保存到内部环境中
|
|
218
218
|
* @param type 当前弹窗类型
|
|
@@ -6,23 +6,43 @@ import type { PopsIframeDetails } from "../components/iframe/indexType";
|
|
|
6
6
|
import type { PopsLoadingDetails } from "../components/loading/indexType";
|
|
7
7
|
import type { PopsPanelDetails } from "../components/panel/indexType";
|
|
8
8
|
import type { PopsPromptDetails } from "../components/prompt/indexType";
|
|
9
|
+
import { PopsRightClickMenuDetails } from "../components/rightClickMenu/indexType";
|
|
10
|
+
import { PopsToolTipDetails } from "../components/tooltip/indexType";
|
|
9
11
|
|
|
10
12
|
export interface PopsUtilsOwnObject<V extends any> {
|
|
11
13
|
[key: string]: V | PopsUtilsOwnObject<V>;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
/** pops的所有类型配置 10个 */
|
|
17
|
+
export interface PopsAllDetails {
|
|
18
|
+
alert: PopsAlertDetails;
|
|
19
|
+
confirm: PopsConfirmDetails;
|
|
20
|
+
prompt: PopsPromptDetails;
|
|
21
|
+
loading: PopsLoadingDetails;
|
|
22
|
+
iframe: PopsIframeDetails;
|
|
23
|
+
tooltip: PopsToolTipDetails;
|
|
24
|
+
drawer: PopsDrawerDetails;
|
|
25
|
+
folder: PopsFolderDetails;
|
|
26
|
+
panel: PopsPanelDetails;
|
|
27
|
+
rightClickMenu: PopsRightClickMenuDetails;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** pops的类型配置 8个 */
|
|
31
|
+
export interface PopsTypeDetails {
|
|
32
|
+
alert: PopsAlertDetails;
|
|
33
|
+
confirm: PopsConfirmDetails;
|
|
34
|
+
prompt: PopsPromptDetails;
|
|
35
|
+
loading: PopsLoadingDetails;
|
|
36
|
+
iframe: PopsIframeDetails;
|
|
37
|
+
// tooltip: PopsToolTipDetails;
|
|
38
|
+
drawer: PopsDrawerDetails;
|
|
39
|
+
folder: PopsFolderDetails;
|
|
40
|
+
panel: PopsPanelDetails;
|
|
41
|
+
// rightClickMenu: PopsRightClickMenuDetails;
|
|
42
|
+
}
|
|
43
|
+
|
|
14
44
|
/** pops的类型 8个 */
|
|
15
|
-
export type PopsType =
|
|
16
|
-
| "alert"
|
|
17
|
-
| "confirm"
|
|
18
|
-
| "prompt"
|
|
19
|
-
| "loading"
|
|
20
|
-
| "iframe"
|
|
21
|
-
// | "tooltip"
|
|
22
|
-
| "drawer"
|
|
23
|
-
| "folder"
|
|
24
|
-
| "panel";
|
|
25
|
-
// | "rightClickMenu";
|
|
45
|
+
export type PopsType = keyof PopsTypeDetails;
|
|
26
46
|
|
|
27
47
|
/** pops所有的类型 10个 */
|
|
28
48
|
export type PopsMode = PopsType | "tooltip" | "rightClickMenu";
|
|
@@ -10,12 +10,12 @@ import type { PopsLayerCommonConfig } from "../types/layer";
|
|
|
10
10
|
import type { PopsLayerMode } from "../types/main";
|
|
11
11
|
export declare const PopsInstanceUtils: {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @param
|
|
13
|
+
* 获取pops所有弹窗中的最大的z-index
|
|
14
|
+
* @param deviation
|
|
15
15
|
*/
|
|
16
|
-
getPopsMaxZIndex(
|
|
16
|
+
getPopsMaxZIndex(deviation?: number): {
|
|
17
17
|
zIndex: number;
|
|
18
|
-
animElement: HTMLDivElement;
|
|
18
|
+
animElement: HTMLDivElement | null;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* 获取CSS Rule
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whitesev/pops",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "弹窗库",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/node/index.esm.js",
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "rollup --config"
|
|
22
22
|
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"registry": "https://registry.npmjs.org/"
|
|
25
|
+
},
|
|
23
26
|
"keywords": [
|
|
24
27
|
"typescript",
|
|
25
28
|
"pops",
|