@whitesev/pops 2.6.1 → 3.0.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.
Files changed (165) hide show
  1. package/dist/index.amd.js +2513 -1534
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.amd.min.js +1 -1
  4. package/dist/index.amd.min.js.map +1 -1
  5. package/dist/index.cjs.js +2513 -1534
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.cjs.min.js +1 -1
  8. package/dist/index.cjs.min.js.map +1 -1
  9. package/dist/index.esm.js +2513 -1534
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.esm.min.js +1 -1
  12. package/dist/index.esm.min.js.map +1 -1
  13. package/dist/index.iife.js +2513 -1534
  14. package/dist/index.iife.js.map +1 -1
  15. package/dist/index.iife.min.js +1 -1
  16. package/dist/index.iife.min.js.map +1 -1
  17. package/dist/index.system.js +2513 -1534
  18. package/dist/index.system.js.map +1 -1
  19. package/dist/index.system.min.js +1 -1
  20. package/dist/index.system.min.js.map +1 -1
  21. package/dist/index.umd.js +2513 -1534
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/index.umd.min.js +1 -1
  24. package/dist/index.umd.min.js.map +1 -1
  25. package/dist/types/eslint.config.d.mts +2 -0
  26. package/dist/types/src/Pops.d.ts +449 -103
  27. package/dist/types/src/PopsCSS.d.ts +3 -1
  28. package/dist/types/src/PopsIcon.d.ts +1 -1
  29. package/dist/types/src/PopsInst.d.ts +2 -2
  30. package/dist/types/src/components/alert/defaultConfig.d.ts +2 -0
  31. package/dist/types/src/components/alert/index.d.ts +2 -2
  32. package/dist/types/src/components/alert/types/index.d.ts +4 -4
  33. package/dist/types/src/components/confirm/defaultConfig.d.ts +2 -0
  34. package/dist/types/src/components/confirm/index.d.ts +2 -2
  35. package/dist/types/src/components/confirm/types/index.d.ts +2 -2
  36. package/dist/types/src/components/drawer/defaultConfig.d.ts +2 -0
  37. package/dist/types/src/components/drawer/index.d.ts +2 -2
  38. package/dist/types/src/components/drawer/types/index.d.ts +2 -2
  39. package/dist/types/src/components/folder/defaultConfig.d.ts +2 -0
  40. package/dist/types/src/components/folder/index.d.ts +2 -2
  41. package/dist/types/src/components/folder/types/index.d.ts +31 -7
  42. package/dist/types/src/components/iframe/defaultConfig.d.ts +2 -0
  43. package/dist/types/src/components/iframe/index.d.ts +2 -5
  44. package/dist/types/src/components/iframe/types/index.d.ts +13 -42
  45. package/dist/types/src/components/loading/defaultConfig.d.ts +2 -0
  46. package/dist/types/src/components/loading/index.d.ts +2 -2
  47. package/dist/types/src/components/loading/types/index.d.ts +4 -4
  48. package/dist/types/src/components/panel/defaultConfig.d.ts +2 -0
  49. package/dist/types/src/components/panel/handlerComponents.d.ts +988 -49
  50. package/dist/types/src/components/panel/index.d.ts +2 -2
  51. package/dist/types/src/components/panel/types/components-button.d.ts +7 -6
  52. package/dist/types/src/components/panel/types/components-common.d.ts +7 -7
  53. package/dist/types/src/components/panel/types/components-container.d.ts +24 -0
  54. package/dist/types/src/components/panel/types/components-deepMenu.d.ts +14 -14
  55. package/dist/types/src/components/panel/types/components-input.d.ts +46 -21
  56. package/dist/types/src/components/panel/types/components-own.d.ts +5 -5
  57. package/dist/types/src/components/panel/types/components-select.d.ts +95 -36
  58. package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +15 -20
  59. package/dist/types/src/components/panel/types/components-slider.d.ts +7 -8
  60. package/dist/types/src/components/panel/types/components-switch.d.ts +6 -6
  61. package/dist/types/src/components/panel/types/components-textarea.d.ts +6 -6
  62. package/dist/types/src/components/panel/types/index.d.ts +36 -28
  63. package/dist/types/src/components/prompt/defaultConfig.d.ts +2 -0
  64. package/dist/types/src/components/prompt/index.d.ts +2 -2
  65. package/dist/types/src/components/prompt/types/index.d.ts +4 -3
  66. package/dist/types/src/components/rightClickMenu/defaultConfig.d.ts +2 -0
  67. package/dist/types/src/components/rightClickMenu/index.d.ts +29 -27
  68. package/dist/types/src/components/rightClickMenu/types/index.d.ts +32 -11
  69. package/dist/types/src/components/searchSuggestion/defaultConfig.d.ts +2 -0
  70. package/dist/types/src/components/searchSuggestion/index.d.ts +24 -9
  71. package/dist/types/src/components/searchSuggestion/types/index.d.ts +15 -13
  72. package/dist/types/src/components/tooltip/defaultConfig.d.ts +2 -0
  73. package/dist/types/src/components/tooltip/index.d.ts +6 -21
  74. package/dist/types/src/components/tooltip/types/index.d.ts +8 -6
  75. package/dist/types/src/config/GlobalConfig.d.ts +3 -3
  76. package/dist/types/src/handler/PopsElementHandler.d.ts +6 -6
  77. package/dist/types/src/handler/PopsHandler.d.ts +18 -18
  78. package/dist/types/src/types/button.d.ts +4 -97
  79. package/dist/types/src/types/components.d.ts +8 -8
  80. package/dist/types/src/types/event.d.ts +0 -30
  81. package/dist/types/src/types/global.d.ts +4 -0
  82. package/dist/types/src/types/inst.d.ts +5 -5
  83. package/dist/types/src/types/main.d.ts +35 -80
  84. package/dist/types/src/types/mask.d.ts +18 -15
  85. package/dist/types/src/utils/PopsInstanceUtils.d.ts +15 -15
  86. package/dist/types/src/utils/PopsUtils.d.ts +4 -0
  87. package/package.json +12 -12
  88. package/src/Pops.ts +44 -44
  89. package/src/PopsAnimation.ts +1 -1
  90. package/src/PopsCSS.ts +4 -1
  91. package/src/PopsInst.ts +2 -2
  92. package/src/components/alert/{config.ts → defaultConfig.ts} +7 -7
  93. package/src/components/alert/index.ts +16 -18
  94. package/src/components/alert/types/index.ts +4 -4
  95. package/src/components/confirm/{config.ts → defaultConfig.ts} +11 -11
  96. package/src/components/confirm/index.ts +11 -13
  97. package/src/components/confirm/types/index.ts +3 -3
  98. package/src/components/drawer/{config.ts → defaultConfig.ts} +10 -10
  99. package/src/components/drawer/index.ts +18 -17
  100. package/src/components/drawer/types/index.ts +3 -3
  101. package/src/components/folder/{config.ts → defaultConfig.ts} +22 -18
  102. package/src/components/folder/index.ts +61 -60
  103. package/src/components/folder/types/index.ts +31 -18
  104. package/src/components/iframe/{config.ts → defaultConfig.ts} +2 -2
  105. package/src/components/iframe/index.ts +24 -29
  106. package/src/components/iframe/types/index.ts +13 -56
  107. package/src/components/loading/{config.ts → defaultConfig.ts} +3 -3
  108. package/src/components/loading/index.ts +13 -11
  109. package/src/components/loading/types/index.ts +5 -5
  110. package/src/components/panel/css/components-select.css +84 -0
  111. package/src/components/panel/defaultConfig.ts +818 -0
  112. package/src/components/panel/handlerComponents.ts +1431 -762
  113. package/src/components/panel/index.css +90 -6
  114. package/src/components/panel/index.ts +15 -28
  115. package/src/components/panel/types/components-button.ts +7 -6
  116. package/src/components/panel/types/components-common.ts +7 -7
  117. package/src/components/panel/types/components-container.ts +25 -0
  118. package/src/components/panel/types/components-deepMenu.ts +14 -14
  119. package/src/components/panel/types/components-input.ts +56 -21
  120. package/src/components/panel/types/components-own.ts +5 -5
  121. package/src/components/panel/types/components-select.ts +100 -38
  122. package/src/components/panel/types/components-selectMultiple.ts +16 -22
  123. package/src/components/panel/types/components-slider.ts +7 -8
  124. package/src/components/panel/types/components-switch.ts +6 -6
  125. package/src/components/panel/types/components-textarea.ts +6 -6
  126. package/src/components/panel/types/index.ts +45 -38
  127. package/src/components/prompt/{config.ts → defaultConfig.ts} +10 -10
  128. package/src/components/prompt/index.ts +13 -15
  129. package/src/components/prompt/types/index.ts +4 -3
  130. package/src/components/rightClickMenu/{config.ts → defaultConfig.ts} +20 -19
  131. package/src/components/rightClickMenu/index.ts +125 -108
  132. package/src/components/rightClickMenu/types/index.ts +36 -14
  133. package/src/components/searchSuggestion/{config.ts → defaultConfig.ts} +18 -11
  134. package/src/components/searchSuggestion/index.ts +130 -155
  135. package/src/components/searchSuggestion/types/index.ts +17 -15
  136. package/src/components/tooltip/{config.ts → defaultConfig.ts} +5 -6
  137. package/src/components/tooltip/index.ts +21 -21
  138. package/src/components/tooltip/types/index.ts +9 -7
  139. package/src/config/GlobalConfig.ts +2 -2
  140. package/src/handler/PopsElementHandler.ts +29 -30
  141. package/src/handler/PopsHandler.ts +43 -43
  142. package/src/types/button.d.ts +4 -97
  143. package/src/types/components.d.ts +8 -8
  144. package/src/types/event.d.ts +0 -30
  145. package/src/types/global.d.ts +4 -0
  146. package/src/types/inst.d.ts +5 -5
  147. package/src/types/main.d.ts +35 -80
  148. package/src/types/mask.d.ts +18 -15
  149. package/src/utils/PopsDOMUtils.ts +34 -34
  150. package/src/utils/PopsInstanceUtils.ts +129 -139
  151. package/src/utils/PopsUtils.ts +60 -45
  152. package/dist/types/src/components/alert/config.d.ts +0 -2
  153. package/dist/types/src/components/confirm/config.d.ts +0 -2
  154. package/dist/types/src/components/drawer/config.d.ts +0 -2
  155. package/dist/types/src/components/folder/config.d.ts +0 -2
  156. package/dist/types/src/components/iframe/config.d.ts +0 -2
  157. package/dist/types/src/components/loading/config.d.ts +0 -2
  158. package/dist/types/src/components/panel/config.d.ts +0 -2
  159. package/dist/types/src/components/panel/types/components-forms.d.ts +0 -23
  160. package/dist/types/src/components/prompt/config.d.ts +0 -2
  161. package/dist/types/src/components/rightClickMenu/config.d.ts +0 -2
  162. package/dist/types/src/components/searchSuggestion/config.d.ts +0 -2
  163. package/dist/types/src/components/tooltip/config.d.ts +0 -2
  164. package/src/components/panel/config.ts +0 -530
  165. package/src/components/panel/types/components-forms.ts +0 -24
@@ -27,8 +27,10 @@ export declare const PopsCSS: {
27
27
  drawerCSS: string;
28
28
  /** pops.folder */
29
29
  folderCSS: string;
30
- /** pops.folder */
30
+ /** pops.panel */
31
31
  panelCSS: string;
32
32
  /** pops.rightClickMenu */
33
33
  rightClickMenu: string;
34
+ /** pops.panel的select组件 */
35
+ panelComponents_Select: string;
34
36
  };
@@ -3,12 +3,12 @@ export declare const PopsIcon: {
3
3
  loading: string;
4
4
  min: string;
5
5
  max: string;
6
+ search: string;
6
7
  mise: string;
7
8
  close: string;
8
9
  edit: string;
9
10
  share: string;
10
11
  delete: string;
11
- search: string;
12
12
  upload: string;
13
13
  next: string;
14
14
  prev: string;
@@ -1,8 +1,8 @@
1
- import type { PopsInstCommonConfig } from "./types/inst";
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]: PopsInstCommonConfig[];
7
+ [key in PopsInstStoreType]: PopsInstGeneralConfig[];
8
8
  };
@@ -0,0 +1,2 @@
1
+ import type { PopsAlertConfig } from "./types";
2
+ export declare const PopsAlertDefaultConfig: () => DeepRequired<PopsAlertConfig>;
@@ -1,4 +1,4 @@
1
- import type { PopsAlertDetails } from "./types";
1
+ import type { PopsAlertConfig } from "./types";
2
2
  export declare const PopsAlert: {
3
- init(details: PopsAlertDetails): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
3
+ init(__config__: PopsAlertConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
4
4
  };
@@ -1,9 +1,9 @@
1
- import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsCommonConfig, PopsButtonConfig } from "../../../types/components";
2
- import type { PopsButtonDetails, PopsButtonDetailsAnyType } from "../../../types/button";
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 PopsAlertDetails extends PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsCommonConfig {
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<PopsButtonDetails | PopsButtonDetailsAnyType>;
14
+ ok?: Partial<PopsGlobalButtonConfig | PopsButtonConfigAnyType>;
15
15
  };
16
16
  }
@@ -0,0 +1,2 @@
1
+ import type { PopsConfirmConfig } from "./types";
2
+ export declare const PopsConfirmDefaultConfig: () => DeepRequired<PopsConfirmConfig>;
@@ -1,4 +1,4 @@
1
- import type { PopsConfirmDetails } from "./types";
1
+ import type { PopsConfirmConfig } from "./types";
2
2
  export declare const PopsConfirm: {
3
- init(details: PopsConfirmDetails): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
3
+ init(__config__: PopsConfirmConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
4
4
  };
@@ -1,6 +1,6 @@
1
- import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsCommonConfig, PopsMoreButtonConfig } from "../../../types/components";
1
+ import type { PopsTitleConfig, PopsContentConfig, PopsDragConfig, PopsGeneralConfig, PopsMoreButtonConfig } from "../../../types/components";
2
2
  /**
3
3
  * pops.confirm
4
4
  */
5
- export interface PopsConfirmDetails extends PopsTitleConfig, PopsContentConfig, PopsMoreButtonConfig, PopsDragConfig, PopsCommonConfig {
5
+ export interface PopsConfirmConfig extends PopsTitleConfig, PopsContentConfig, PopsMoreButtonConfig, PopsDragConfig, PopsGeneralConfig {
6
6
  }
@@ -0,0 +1,2 @@
1
+ import type { PopsDrawerConfig } from "./types";
2
+ export declare const PopsDrawerDefaultConfig: () => DeepRequired<PopsDrawerConfig>;
@@ -1,4 +1,4 @@
1
- import type { PopsDrawerDetails } from "./types";
1
+ import type { PopsDrawerConfig } from "./types";
2
2
  export declare const PopsDrawer: {
3
- init(details: PopsDrawerDetails): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
3
+ init(__config__: PopsDrawerConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
4
4
  };
@@ -1,8 +1,8 @@
1
- import type { PopsTitleConfig, PopsContentConfig, PopsCommonConfig, PopsMoreButtonConfig } from "../../../types/components";
1
+ import type { PopsTitleConfig, PopsContentConfig, PopsGeneralConfig, PopsMoreButtonConfig } from "../../../types/components";
2
2
  /**
3
3
  * pops.drawer
4
4
  */
5
- export interface PopsDrawerDetails extends PopsContentConfig, PopsMoreButtonConfig, Omit<PopsCommonConfig, "width" | "height" | "position" | "animation"> {
5
+ export interface PopsDrawerConfig extends PopsContentConfig, PopsMoreButtonConfig, Omit<PopsGeneralConfig, "width" | "height" | "position" | "animation"> {
6
6
  /**
7
7
  * 标题
8
8
  */
@@ -0,0 +1,2 @@
1
+ import type { PopsFolderConfig } from "./types";
2
+ export declare const PopsFolderDefaultConfig: () => DeepRequired<PopsFolderConfig>;
@@ -1,4 +1,4 @@
1
- import type { PopsFolderDetails } from "./types";
1
+ import type { PopsFolderConfig } from "./types";
2
2
  export declare const PopsFolder: {
3
- init(details: PopsFolderDetails): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
3
+ init(__config__: PopsFolderConfig): Omit<import("../../types/event").PopsEventConfig, "function" | "type">;
4
4
  };
@@ -1,4 +1,32 @@
1
- import type { PopsTitleConfig, PopsDragConfig, PopsCommonConfig, PopsMoreButtonConfig } from "../../../types/components";
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) => Promise<{
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 PopsFolderDetails extends PopsTitleConfig, PopsDragConfig, PopsMoreButtonConfig, PopsCommonConfig {
70
+ export interface PopsFolderConfig extends PopsTitleConfig, PopsDragConfig, PopsMoreButtonConfig, PopsGeneralConfig {
47
71
  /**
48
72
  * 排序
49
73
  */
@@ -0,0 +1,2 @@
1
+ import type { PopsIframeConfig } from "./types";
2
+ export declare const PopsIframeDefaultConfig: () => DeepRequired<PopsIframeConfig>;
@@ -1,7 +1,4 @@
1
- import type { PopsEventConfig } from "../../types/event";
2
- import type { PopsIframeDetails } from "./types";
1
+ import type { PopsIframeClickEventConfig, PopsIframeConfig } from "./types";
3
2
  export declare const PopsIframe: {
4
- init(details: PopsIframeDetails): Omit<PopsEventConfig & {
5
- iframeElement: HTMLIFrameElement;
6
- }, "function" | "type">;
3
+ init(__config__: PopsIframeConfig): Omit<PopsIframeClickEventConfig, "function" | "type">;
7
4
  };
@@ -1,38 +1,18 @@
1
- import type { PopsTitleConfig, PopsDragConfig, PopsCommonConfig } from "../../../types/components";
1
+ import type { PopsTitleConfig, PopsDragConfig, PopsGeneralConfig } from "../../../types/components";
2
2
  import type { PopsEventConfig } from "../../../types/event";
3
3
  /**
4
- * pops.iframe的按钮的点击回调参数event
4
+ * pops.iframe的按钮点击事件回调的配置参数
5
5
  */
6
- export interface PopsBtnIframeCallBackEvent {
7
- /**
8
- * 动画元素(包裹着弹窗元素)
9
- */
10
- animElement: HTMLElement;
11
- /**
12
- * 弹窗元素
13
- */
14
- popsElement: HTMLElement;
15
- /**
16
- * 遮罩层元素,如果未设置,那么不存在
17
- */
18
- maskElement?: HTMLElement;
6
+ export type PopsIframeClickEventConfig = PopsEventConfig & {
19
7
  /**
20
8
  * iframe元素
21
9
  */
22
- iframePopsElement: HTMLIFrameElement;
23
- /**
24
- * 使用的方法名
25
- */
26
- function: "iframe";
27
- /**
28
- * 唯一id
29
- */
30
- guid: string;
31
- }
10
+ $iframe: HTMLIFrameElement;
11
+ };
32
12
  /**
33
13
  * pops.iframe
34
14
  */
35
- export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, PopsCommonConfig {
15
+ export interface PopsIframeConfig extends PopsTitleConfig, PopsDragConfig, PopsGeneralConfig {
36
16
  /**
37
17
  * 加载配置
38
18
  */
@@ -61,9 +41,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
61
41
  /**
62
42
  * 点击的回调函数
63
43
  */
64
- callback: (eventConfig: PopsEventConfig & {
65
- iframeElement: HTMLIFrameElement;
66
- }, event: MouseEvent | PointerEvent) => void;
44
+ callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
67
45
  };
68
46
  /**
69
47
  * 最大化
@@ -72,9 +50,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
72
50
  /**
73
51
  * 点击的回调函数
74
52
  */
75
- callback: (eventConfig: PopsEventConfig & {
76
- iframeElement: HTMLIFrameElement;
77
- }, event: MouseEvent | PointerEvent) => void;
53
+ callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
78
54
  };
79
55
  /**
80
56
  * 窗口化
@@ -83,9 +59,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
83
59
  /**
84
60
  * 点击的回调函数
85
61
  */
86
- callback: (eventConfig: PopsEventConfig & {
87
- iframeElement: HTMLIFrameElement;
88
- }, event: MouseEvent | PointerEvent) => void;
62
+ callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
89
63
  };
90
64
  /**
91
65
  * 关闭
@@ -94,9 +68,7 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
94
68
  /**
95
69
  * 点击的回调函数
96
70
  */
97
- callback: (eventConfig: PopsEventConfig & {
98
- iframeElement: HTMLIFrameElement;
99
- }, event: MouseEvent | PointerEvent) => void;
71
+ callback: (eventConfig: PopsIframeClickEventConfig, event: MouseEvent | PointerEvent) => void;
100
72
  };
101
73
  };
102
74
  /**
@@ -106,8 +78,9 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
106
78
  url?: string;
107
79
  /**
108
80
  * 右上角按钮顺序:最小化、最大化、窗口化、关闭
81
+ * @default "min|max|mise|close"
109
82
  */
110
- topRightButton: "min|max|mise|close";
83
+ topRightButton: string;
111
84
  /**
112
85
  * 是否启用沙箱,默认false
113
86
  * @default false
@@ -116,7 +89,5 @@ export interface PopsIframeDetails extends PopsTitleConfig, PopsDragConfig, Pops
116
89
  /**
117
90
  * 加载完毕的回调
118
91
  */
119
- loadEndCallBack?: (details: PopsEventConfig & {
120
- iframeElement: HTMLIFrameElement;
121
- }) => void;
92
+ loadEndCallBack?: (eventConfig: PopsIframeClickEventConfig) => void;
122
93
  }
@@ -0,0 +1,2 @@
1
+ import type { PopsLoadingConfig } from "./types";
2
+ export declare const PopsLoadingDefaultConfig: () => DeepRequired<PopsLoadingConfig>;
@@ -1,4 +1,4 @@
1
- import type { PopsLoadingDetails } from "./types";
1
+ import type { PopsLoadingConfig } from "./types";
2
2
  export declare const PopsLoading: {
3
- init(details: PopsLoadingDetails): Omit<Omit<import("../../types/event").PopsEventConfig, "$shadowContainer" | "$shadowRoot">, "function" | "type">;
3
+ init(__config__: PopsLoadingConfig): Omit<Omit<import("../../types/event").PopsEventConfig, "$shadowContainer" | "$shadowRoot">, "function" | "type">;
4
4
  };
@@ -1,13 +1,13 @@
1
- import type { PopsCommonConfig, PopsContentConfig } from "../../../types/components";
1
+ import type { PopsGeneralConfig, PopsContentConfig } from "../../../types/components";
2
2
  /**
3
3
  * pops.loading
4
4
  */
5
- export interface PopsLoadingDetails extends Omit<PopsCommonConfig, "width" | "height" | "position" | "beforeAppendToPageCallBack"> {
5
+ export interface PopsLoadingConfig extends Omit<PopsGeneralConfig, "width" | "height" | "position" | "beforeAppendToPageCallBack"> {
6
6
  /**
7
7
  * 父元素,默认为document.body
8
- * @default document.body
8
+ * @default document.body || document.documentElement
9
9
  */
10
- parent?: HTMLElement;
10
+ $parent?: HTMLElement;
11
11
  /**
12
12
  * 内容配置
13
13
  */
@@ -0,0 +1,2 @@
1
+ import type { PopsPanelConfig } from "./types";
2
+ export declare const PopsPanelDefaultConfig: () => DeepRequired<PopsPanelConfig>;