@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
@@ -1,6 +1,5 @@
1
1
  import type { PopsEventConfig, PopsHandlerEventConfig } from "./event";
2
2
  import type { PopsIconType } from "./icon";
3
- import type { PopsType } from "./main";
4
3
 
5
4
  /**
6
5
  * 按钮类型
@@ -24,56 +23,10 @@ export type PopsButtonStyleType =
24
23
  */
25
24
  export type PopsButtonSize = "large" | "small";
26
25
 
27
- /**
28
- * 按钮的点击回调参数event
29
- */
30
- export interface PopsBtnCallBackEvent {
31
- /**
32
- * 元素
33
- */
34
- element: HTMLElement;
35
- /**
36
- * 动画元素(包裹着弹窗元素)
37
- */
38
- animElement: HTMLElement;
39
- /**
40
- * 弹窗元素
41
- */
42
- popsElement: HTMLElement;
43
- /**
44
- * 遮罩层元素
45
- */
46
- maskElement: HTMLElement | undefined;
47
- /**
48
- * 按钮调用类型
49
- */
50
- type: PopsButtonType;
51
- /**
52
- * 调用的方法
53
- */
54
- mode: PopsType;
55
- /**
56
- * 唯一id
57
- */
58
- guid: string;
59
- /**
60
- * 关闭弹窗
61
- */
62
- close(): void;
63
- /**
64
- * 隐藏弹窗
65
- */
66
- hide(): void;
67
- /**
68
- * 显示弹窗
69
- */
70
- show(): void;
71
- }
72
-
73
26
  /**
74
27
  * 按钮配置
75
28
  */
76
- export interface PopsButtonDetails<T = object> {
29
+ export interface PopsGlobalButtonConfig<T = object> {
77
30
  /**
78
31
  * 是否启用按钮
79
32
  */
@@ -116,7 +69,7 @@ export interface PopsButtonDetails<T = object> {
116
69
  /**
117
70
  * 按钮配置(匹配任意类型)
118
71
  */
119
- export type PopsButtonDetailsAnyType<T = object> = Omit<PopsButtonDetails<T>, "type"> & {
72
+ export type PopsButtonConfigAnyType<T = object> = Omit<PopsGlobalButtonConfig<T>, "type"> & {
120
73
  /**
121
74
  * 按钮样式类型
122
75
  * @default "default"
@@ -124,56 +77,10 @@ export type PopsButtonDetailsAnyType<T = object> = Omit<PopsButtonDetails<T>, "t
124
77
  type: string;
125
78
  };
126
79
 
127
- /** prompt的点击回调 */
128
- export interface PopsPromptButtonDetails extends PopsButtonDetails {
129
- callback(
130
- eventConfig: PopsHandlerEventConfig & {
131
- text: string;
132
- },
133
- event: PointerEvent | MouseEvent
134
- ): void;
135
- }
136
- /**
137
- * 右上角关闭按钮点击回调的配置
138
- */
139
- export interface PopsHeaderCloseButtonClickCallBackEvent {
140
- /**
141
- * 动画元素(包裹着弹窗元素)
142
- */
143
- animElement: HTMLElement;
144
- /**
145
- * 遮罩层元素,如果未设置,那么不存在
146
- */
147
- maskElement?: HTMLElement;
148
- /**
149
- * 按钮调用类型
150
- */
151
- type: string;
152
- /**
153
- * 唯一id
154
- */
155
- guid: string;
156
- /**
157
- * 关闭弹窗
158
- */
159
- close(): void;
160
- /**
161
- * 隐藏弹窗
162
- */
163
- hide(): void;
164
- /**
165
- * 显示弹窗
166
- */
167
- show(): void;
168
- /**
169
- * 输入的内容
170
- */
171
- text: string;
172
- }
173
80
  /**
174
81
  * 顶部关闭按钮配置
175
82
  */
176
- export interface PopsHeaderCloseButtonDetails {
83
+ export interface PopsHeaderCloseButtonConfig {
177
84
  /**
178
85
  * 是否启用按钮
179
86
  */
@@ -183,5 +90,5 @@ export interface PopsHeaderCloseButtonDetails {
183
90
  *
184
91
  * 如果传入该值,那么将不会自动关闭弹窗
185
92
  */
186
- callback?: (details: PopsEventConfig, event: PointerEvent | MouseEvent) => void;
93
+ callback?: (eventConfig: PopsEventConfig, event: PointerEvent | MouseEvent) => void;
187
94
  }
@@ -1,7 +1,7 @@
1
1
  import type { PopsAnimation } from "./animation";
2
2
  import type { PopsPosition, PopsTextAlign, PopsJustifyContent } from "./position";
3
- import type { PopsButtonDetails, PopsButtonDetailsAnyType, PopsHeaderCloseButtonDetails } from "./button";
4
- import type { PopsMaskDetails } from "./mask";
3
+ import type { PopsGlobalButtonConfig, PopsButtonConfigAnyType, PopsHeaderCloseButtonConfig } from "./button";
4
+ import type { PopsMaskConfig } from "./mask";
5
5
 
6
6
  /**
7
7
  * 标题配置
@@ -62,7 +62,7 @@ export interface PopsButtonConfig {
62
62
  /**
63
63
  * 右上角的关闭按钮
64
64
  */
65
- close?: PopsHeaderCloseButtonDetails;
65
+ close?: PopsHeaderCloseButtonConfig;
66
66
  };
67
67
  }
68
68
  /**
@@ -88,15 +88,15 @@ export interface PopsMoreButtonConfig<T = object> {
88
88
  /**
89
89
  * 确定按钮
90
90
  */
91
- ok?: Partial<PopsButtonDetails<T> | PopsButtonDetailsAnyType<T>>;
91
+ ok?: Partial<PopsGlobalButtonConfig<T> | PopsButtonConfigAnyType<T>>;
92
92
  /**
93
93
  * 取消按钮
94
94
  */
95
- cancel?: Partial<PopsButtonDetails<T> | PopsButtonDetailsAnyType<T>>;
95
+ cancel?: Partial<PopsGlobalButtonConfig<T> | PopsButtonConfigAnyType<T>>;
96
96
  /**
97
97
  * 其他按钮
98
98
  */
99
- other?: Partial<PopsButtonDetails<T> | PopsButtonDetailsAnyType<T>>;
99
+ other?: Partial<PopsGlobalButtonConfig<T> | PopsButtonConfigAnyType<T>>;
100
100
  };
101
101
  }
102
102
  /**
@@ -136,7 +136,7 @@ export interface PopsDragConfig {
136
136
  /**
137
137
  * 通用配置
138
138
  */
139
- export interface PopsCommonConfig {
139
+ export interface PopsGeneralConfig {
140
140
  /**
141
141
  * 是否使用shadowRoot
142
142
  *
@@ -188,7 +188,7 @@ export interface PopsCommonConfig {
188
188
  /**
189
189
  * 遮罩层
190
190
  */
191
- mask?: PopsMaskDetails;
191
+ mask?: PopsMaskConfig;
192
192
  /**
193
193
  * 是否禁用页面滚动
194
194
  *
@@ -1,35 +1,5 @@
1
- import type { PopsIframeDetails } from "../components/iframe/types";
2
1
  import type { PopsType } from "./main";
3
2
 
4
- /**
5
- * 事件配置
6
- */
7
- export interface PopsIframeEventConfig {
8
- /**
9
- * 唯一id
10
- */
11
- guid: string;
12
- /**
13
- * 当前弹窗类型
14
- */
15
- mode: PopsType;
16
- /**
17
- * 动画层
18
- */
19
- animElement: HTMLElement;
20
- /**
21
- * 主元素
22
- */
23
- popsElement: HTMLElement;
24
- /**
25
- * 遮罩层
26
- */
27
- maskElement: HTMLElement;
28
- /**
29
- * 当前配置
30
- */
31
- config: PopsIframeDetails;
32
- }
33
3
  /**
34
4
  * 事件配置
35
5
  */
@@ -25,3 +25,7 @@ declare type DeepRequired<T> = T extends any[]
25
25
  [K in keyof T]-?: DeepRequired<T[K]>;
26
26
  }
27
27
  : T;
28
+
29
+ declare type IPromise<T> = T | Promise<T>;
30
+
31
+ declare type IFunction<T> = T | (() => T);
@@ -5,20 +5,20 @@ export interface PopsInstConfig {
5
5
  /** 固定id */
6
6
  guid: string;
7
7
  /** 动画元素 */
8
- animElement: HTMLDivElement;
8
+ $anim: HTMLDivElement;
9
9
  /** 主元素 */
10
- popsElement: HTMLDivElement;
10
+ $pops: HTMLDivElement;
11
11
  /** 遮罩层元素 */
12
- maskElement?: HTMLDivElement;
12
+ $mask?: HTMLDivElement;
13
13
  }
14
14
  /**
15
15
  * config实例通用配置
16
16
  */
17
- export interface PopsInstCommonConfig extends PopsInstConfig {
17
+ export interface PopsInstGeneralConfig extends PopsInstConfig {
18
18
  /** shadow容器 */
19
19
  $shadowContainer: HTMLDivElement;
20
20
  /** shadow容器的shandowRoot */
21
21
  $shadowRoot: ShadowRoot | HTMLElement;
22
22
  /** 移除实例前的回调函数 */
23
- beforeRemoveCallBack?: (instCommonConfig: PopsInstCommonConfig) => void;
23
+ beforeRemoveCallBack?: (instCommonConfig: PopsInstGeneralConfig) => void;
24
24
  }
@@ -1,111 +1,66 @@
1
- import type { PopsAlertDetails } from "../components/alert/types";
2
- import type { PopsConfirmDetails } from "../components/confirm/types";
3
- import type { PopsDrawerDetails } from "../components/drawer/types";
4
- import type { PopsFolderDetails } from "../components/folder/types";
5
- import type { PopsIframeDetails } from "../components/iframe/types";
6
- import type { PopsLoadingDetails } from "../components/loading/types";
7
- import type { PopsPanelButtonDetails } from "../components/panel/types/components-button";
8
- import type { PopsPanelDeepMenuDetails } from "../components/panel/types/components-deepMenu";
9
- import type { PopsPanelDetails } from "../components/panel/types";
10
- import type { PopsPanelInputDetails } from "../components/panel/types/components-input";
11
- import type { PopsPanelOwnDetails } from "../components/panel/types/components-own";
12
- import type { PopsPanelSelectDetails } from "../components/panel/types/components-select";
13
- import type { PopsPanelSliderDetails } from "../components/panel/types/components-slider";
14
- import type { PopsPanelSwitchDetails } from "../components/panel/types/components-switch";
15
- import type { PopsPanelTextAreaDetails } from "../components/panel/types/components-textarea";
16
- import type { PopsPromptDetails } from "../components/prompt/types/index";
17
- import type { PopsRightClickMenuDetails } from "../components/rightClickMenu/types";
18
- import type { PopsToolTipDetails } from "../components/tooltip/types/index";
19
- import type { PopsSearchSuggestionDetails } from "../components/searchSuggestion/types";
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 { PopsToolTipConfig } from "../components/tooltip/types/index";
11
+ import type { PopsSearchSuggestionConfig } from "../components/searchSuggestion/types";
20
12
 
21
13
  export interface PopsUtilsOwnObject<V> {
22
14
  [key: string]: V | PopsUtilsOwnObject<V>;
23
15
  }
24
16
 
25
17
  /** pops所有的类型配置 11个*/
26
- export interface PopsDetails {
27
- alert: PopsAlertDetails;
28
- confirm: PopsConfirmDetails;
29
- prompt: PopsPromptDetails;
30
- loading: PopsLoadingDetails;
31
- iframe: PopsIframeDetails;
32
- tooltip: PopsToolTipDetails;
33
- drawer: PopsDrawerDetails;
34
- folder: PopsFolderDetails;
35
- panel: PopsPanelDetails;
36
- rightClickMenu: PopsRightClickMenuDetails;
37
- searchSuggestion: PopsSearchSuggestionDetails;
18
+ export interface PopsConfig {
19
+ alert: PopsAlertConfig;
20
+ confirm: PopsConfirmConfig;
21
+ prompt: PopsPromptConfig;
22
+ loading: PopsLoadingConfig;
23
+ iframe: PopsIframeConfig;
24
+ tooltip: PopsToolTipConfig;
25
+ drawer: PopsDrawerConfig;
26
+ folder: PopsFolderConfig;
27
+ panel: PopsPanelConfig;
28
+ rightClickMenu: PopsRightClickMenuConfig;
29
+ searchSuggestion: PopsSearchSuggestionConfig;
38
30
  }
39
31
 
40
32
  /** pops的类型 */
41
- export type PopsType = keyof PopsDetails;
33
+ export type PopsType = keyof PopsConfig;
42
34
 
43
35
  /** pops中支持only的配置 */
44
- export type PopsSupportOnlyDetails = Omit<PopsDetails, "searchSuggestion">;
36
+ export type PopsSupportOnlyConfig = Omit<PopsConfig, "searchSuggestion">;
45
37
 
46
38
  /** 存储实例的类型 */
47
- export type PopsInstStoreType = keyof Omit<PopsDetails, "searchSuggestion">;
39
+ export type PopsInstStoreType = keyof Omit<PopsConfig, "searchSuggestion">;
48
40
 
49
41
  /** pops弹窗支持动画元素的配置 8个 */
50
- export type PopsSupportAnimDetails = Omit<PopsDetails, "tooltip" | "rightClickMenu" | "searchSuggestion">;
42
+ export type PopsSupportAnimConfig = Omit<PopsConfig, "tooltip" | "rightClickMenu" | "searchSuggestion">;
51
43
 
52
44
  /** pops弹窗支持动画元素的类型 */
53
- export type PopsSupportAnimDetailsType = keyof PopsSupportAnimDetails;
45
+ export type PopsSupportAnimConfigType = keyof PopsSupportAnimConfig;
54
46
 
55
47
  /** pops弹窗支持标题栏的配置 */
56
- export type PopsSupportHeaderTitleDetails = Pick<
57
- PopsDetails,
48
+ export type PopsSupportHeaderTitleConfig = Pick<
49
+ PopsConfig,
58
50
  "alert" | "confirm" | "prompt" | "iframe" | "drawer" | "folder" | "panel"
59
51
  >;
60
52
 
61
53
  /** pops弹窗支持标题栏的类型 */
62
- export type PopsSupportHeaderTitleDetailsType = keyof PopsSupportHeaderTitleDetails;
54
+ export type PopsSupportHeaderTitleConfigType = keyof PopsSupportHeaderTitleConfig;
63
55
 
64
56
  /** pops支持底部按钮的配置 */
65
- export type PopsSupportBottomBtnDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer">;
57
+ export type PopsSupportBottomButtonConfig = Pick<PopsConfig, "alert" | "confirm" | "prompt" | "drawer">;
66
58
 
67
59
  /** pops支持底部按钮的类型 */
68
- export type PopsSupportBottomBtnDetailsType = keyof PopsSupportHeaderTitleDetails;
60
+ export type PopsSupportBottomButtonConfigType = keyof PopsSupportHeaderTitleConfig;
69
61
 
70
62
  /** pops支持中间内容的配置 */
71
- export type PopsSupportContentDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer" | "loading">;
63
+ export type PopsSupportContentConfig = Pick<PopsConfig, "alert" | "confirm" | "prompt" | "drawer" | "loading">;
72
64
 
73
65
  /** pops支持中间内容的类型 */
74
- export type PopsSupportContentDetailsType = keyof PopsSupportContentDetails;
75
-
76
- /** panel的各种类型的配置项 */
77
- export type PopsPanelFormsTotalDetails =
78
- | PopsPanelSwitchDetails
79
- | PopsPanelSliderDetails
80
- | PopsPanelInputDetails
81
- | PopsPanelTextAreaDetails
82
- | PopsPanelSelectDetails<any>
83
- | PopsPanelButtonDetails
84
- | PopsPanelDeepMenuDetails
85
- | PopsPanelOwnDetails;
86
-
87
- /**
88
- * pops.xxx的调用返回值
89
- */
90
- export interface PopsCallResult {
91
- /** 唯一标识id */
92
- guid: string;
93
- /** 影子元素 */
94
- $shadowContainer: HTMLDivElement;
95
- /** 影子元素的根节点 */
96
- $shadowRoot: ShadowRoot | HTMLElement;
97
- /** 元素 */
98
- element: HTMLDivElement;
99
- /** 动画层元素 */
100
- animElement: HTMLDivElement;
101
- /** pops元素 */
102
- popsElement: HTMLDivElement;
103
- /** 遮罩层元素 */
104
- maskElement?: HTMLDivElement;
105
- /** 关闭弹窗 */
106
- close(): void;
107
- /** 隐藏弹窗 */
108
- hide(): void;
109
- /** 显示弹窗 */
110
- show(): void;
111
- }
66
+ export type PopsSupportContentConfigType = keyof PopsSupportContentConfig;
@@ -1,20 +1,23 @@
1
- import type { PopsAlertDetails } from "../components/alert/types";
2
- import type { PopsDrawerDetails } from "../components/drawer/types";
3
- import type { PopsFolderDetails } from "../components/folder/types";
4
- import type { PopsIframeDetails } from "../components/iframe/types";
5
- import type { PopsLoadingDetails } from "../components/loading/types";
6
- import type { PopsPanelDetails } from "../components/panel/types";
7
- import type { PopsPromptDetails } from "../components/prompt/types/index";
1
+ import type { PopsAlertConfig } from "../components/alert/types";
2
+ import type { PopsDrawerConfig } from "../components/drawer/types";
3
+ import type { PopsFolderConfig } from "../components/folder/types";
4
+ import type { PopsIframeConfig } from "../components/iframe/types";
5
+ import type { PopsLoadingConfig } from "../components/loading/types";
6
+ import type { PopsPanelConfig } from "../components/panel/types";
7
+ import type { PopsPromptConfig } from "../components/prompt/types/index";
8
8
 
9
9
  /**
10
10
  * 遮罩层配置
11
11
  */
12
- export interface PopsMaskDetails {
12
+ export interface PopsMaskConfig {
13
13
  /**
14
14
  * 是否启用遮罩层,默认false
15
15
  * @default false
16
16
  */
17
17
  enable?: boolean;
18
+ /**
19
+ * 点击事件
20
+ */
18
21
  clickEvent?: {
19
22
  /**
20
23
  * 点击遮罩层是否触发关闭事件
@@ -36,13 +39,13 @@ export interface PopsMaskDetails {
36
39
  | ((
37
40
  originalRun: () => void | Promise<void>,
38
41
  config:
39
- | PopsAlertDetails
40
- | PopsDrawerDetails
41
- | PopsIframeDetails
42
- | PopsPromptDetails
43
- | PopsFolderDetails
44
- | PopsLoadingDetails
45
- | PopsPanelDetails
42
+ | PopsAlertConfig
43
+ | PopsDrawerConfig
44
+ | PopsIframeConfig
45
+ | PopsPromptConfig
46
+ | PopsFolderConfig
47
+ | PopsLoadingConfig
48
+ | PopsPanelConfig
46
49
  ) => void)
47
50
  | undefined
48
51
  | null;