bkui-vue 0.0.1-beta.340 → 0.0.1-beta.341

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 (222) hide show
  1. package/dist/index.cjs.js +50 -50
  2. package/dist/index.esm.js +280 -116
  3. package/dist/index.umd.js +49 -49
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/affix.d.ts +1 -1
  7. package/lib/affix/index.d.ts +4 -4
  8. package/lib/alert/alert.d.ts +5 -5
  9. package/lib/alert/index.d.ts +11 -11
  10. package/lib/alert/index.js +1 -1
  11. package/lib/animate-number/animate-number.d.ts +1 -1
  12. package/lib/animate-number/index.d.ts +4 -4
  13. package/lib/backtop/backtop.d.ts +1 -1
  14. package/lib/backtop/index.d.ts +4 -4
  15. package/lib/button/button-group.d.ts +2 -2
  16. package/lib/button/button.d.ts +29 -30
  17. package/lib/button/index.d.ts +45 -48
  18. package/lib/button/index.js +1 -1
  19. package/lib/cascader/cascader.d.ts +1 -1
  20. package/lib/cascader/index.d.ts +4 -4
  21. package/lib/checkbox/checkbox.d.ts +8 -8
  22. package/lib/checkbox/index.d.ts +14 -14
  23. package/lib/checkbox/index.js +1 -1
  24. package/lib/code-diff/code-diff.css +27 -7
  25. package/lib/code-diff/code-diff.less +42 -7
  26. package/lib/code-diff/code-diff.variable.css +27 -7
  27. package/lib/collapse/collapse-panel.d.ts +2 -7
  28. package/lib/collapse/index.d.ts +2 -7
  29. package/lib/collapse/index.js +1 -1
  30. package/lib/collapse/props.d.ts +1 -43
  31. package/lib/color-picker/color-picker.d.ts +7 -7
  32. package/lib/color-picker/index.d.ts +12 -12
  33. package/lib/color-picker/index.js +1 -1
  34. package/lib/date-picker/date-picker.d.ts +7 -7
  35. package/lib/date-picker/index.d.ts +18 -18
  36. package/lib/date-picker/panel/date-range.d.ts +1 -1
  37. package/lib/date-picker/panel/date.d.ts +1 -1
  38. package/lib/date-picker/panel/time-range.d.ts +7 -7
  39. package/lib/date-picker/panel/time.d.ts +8 -8
  40. package/lib/date-picker/props.d.ts +2 -2
  41. package/lib/date-picker/time-picker.d.ts +7 -7
  42. package/lib/dialog/dialog.d.ts +21 -46
  43. package/lib/dialog/index.d.ts +46 -101
  44. package/lib/dialog/index.js +1 -1
  45. package/lib/dialog/props.d.ts +9 -19
  46. package/lib/divider/divider.d.ts +15 -15
  47. package/lib/divider/index.d.ts +34 -34
  48. package/lib/divider/index.js +1 -1
  49. package/lib/divider/props.d.ts +6 -6
  50. package/lib/dropdown/dropdown.d.ts +17 -17
  51. package/lib/dropdown/index.d.ts +24 -24
  52. package/lib/dropdown/index.js +1 -1
  53. package/lib/exception/exception.d.ts +10 -10
  54. package/lib/exception/index.d.ts +22 -22
  55. package/lib/exception/index.js +1 -1
  56. package/lib/icon/angle-double-down-line.js +1 -1
  57. package/lib/icon/angle-double-left-line.js +1 -1
  58. package/lib/icon/angle-double-left.js +1 -1
  59. package/lib/icon/angle-double-right-line.js +1 -1
  60. package/lib/icon/angle-double-right.js +1 -1
  61. package/lib/icon/angle-double-up-line.js +1 -1
  62. package/lib/icon/angle-down-fill.js +1 -1
  63. package/lib/icon/angle-down-line.js +1 -1
  64. package/lib/icon/angle-down.js +1 -1
  65. package/lib/icon/angle-left.js +1 -1
  66. package/lib/icon/angle-right.js +1 -1
  67. package/lib/icon/angle-up-fill.js +1 -1
  68. package/lib/icon/angle-up.js +1 -1
  69. package/lib/icon/archive-fill.js +1 -1
  70. package/lib/icon/arrows-left.js +1 -1
  71. package/lib/icon/arrows-right.js +1 -1
  72. package/lib/icon/audio-fill.js +1 -1
  73. package/lib/icon/bk.js +1 -1
  74. package/lib/icon/circle.js +1 -1
  75. package/lib/icon/close-line.js +1 -1
  76. package/lib/icon/close.js +1 -1
  77. package/lib/icon/code.js +1 -1
  78. package/lib/icon/cog-shape.js +1 -1
  79. package/lib/icon/collapse-left.js +1 -1
  80. package/lib/icon/copy.js +1 -1
  81. package/lib/icon/data-shape.js +1 -1
  82. package/lib/icon/del.js +1 -1
  83. package/lib/icon/doc-fill.js +1 -1
  84. package/lib/icon/done.js +1 -1
  85. package/lib/icon/down-shape.js +1 -1
  86. package/lib/icon/down-small.js +1 -1
  87. package/lib/icon/edit-line.js +1 -1
  88. package/lib/icon/ellipsis.js +1 -1
  89. package/lib/icon/enlarge-line.js +1 -1
  90. package/lib/icon/error.js +1 -1
  91. package/lib/icon/excel-fill.js +1 -1
  92. package/lib/icon/exclamation-circle-shape.js +1 -1
  93. package/lib/icon/eye.js +1 -1
  94. package/lib/icon/filliscreen-line.js +1 -1
  95. package/lib/icon/folder-open.js +1 -1
  96. package/lib/icon/folder-shape-open.js +1 -1
  97. package/lib/icon/folder-shape.js +1 -1
  98. package/lib/icon/folder.js +1 -1
  99. package/lib/icon/funnel.js +1 -1
  100. package/lib/icon/help-document-fill.js +1 -1
  101. package/lib/icon/help-fill.js +1 -1
  102. package/lib/icon/help.js +1 -1
  103. package/lib/icon/img-error.js +1 -1
  104. package/lib/icon/img-placehoulder.js +1 -1
  105. package/lib/icon/index.d.ts +1 -1
  106. package/lib/icon/index.js +1 -1
  107. package/lib/icon/info-line.js +1 -1
  108. package/lib/icon/info.js +1 -1
  109. package/lib/icon/left-shape.js +1 -1
  110. package/lib/icon/left-turn-line.js +1 -1
  111. package/lib/icon/narrow-line.js +1 -1
  112. package/lib/icon/{original .d.ts → original.d.ts} +0 -0
  113. package/lib/icon/original.js +1 -0
  114. package/lib/icon/pdf-fill.js +1 -1
  115. package/lib/icon/play-shape.js +1 -1
  116. package/lib/icon/plus.js +1 -1
  117. package/lib/icon/ppt-fill.js +1 -1
  118. package/lib/icon/qq.js +1 -1
  119. package/lib/icon/right-shape.js +1 -1
  120. package/lib/icon/right-turn-line.js +1 -1
  121. package/lib/icon/search.js +1 -1
  122. package/lib/icon/share.js +1 -1
  123. package/lib/icon/spinner.js +1 -1
  124. package/lib/icon/success.js +1 -1
  125. package/lib/icon/switcher-loading.js +1 -1
  126. package/lib/icon/text-file.js +1 -1
  127. package/lib/icon/text-fill.js +1 -1
  128. package/lib/icon/transfer.js +1 -1
  129. package/lib/icon/tree-application-shape.js +1 -1
  130. package/lib/icon/unfull-screen.js +1 -1
  131. package/lib/icon/unvisible.js +1 -1
  132. package/lib/icon/up-shape.js +1 -1
  133. package/lib/icon/upload.js +1 -1
  134. package/lib/icon/video-fill.js +1 -1
  135. package/lib/icon/warn.js +1 -1
  136. package/lib/icon/weixin.js +1 -1
  137. package/lib/image/image.d.ts +5 -5
  138. package/lib/image/index.d.ts +11 -11
  139. package/lib/image/index.js +1 -1
  140. package/lib/image/props.d.ts +2 -2
  141. package/lib/info-box/index.js +1 -1
  142. package/lib/input/index.d.ts +16 -16
  143. package/lib/input/index.js +1 -1
  144. package/lib/input/input.d.ts +10 -10
  145. package/lib/link/index.d.ts +15 -15
  146. package/lib/link/index.js +1 -1
  147. package/lib/link/link.d.ts +6 -6
  148. package/lib/loading/index.d.ts +38 -22
  149. package/lib/loading/index.js +1 -1
  150. package/lib/loading/loading.d.ts +27 -15
  151. package/lib/message/index.js +1 -1
  152. package/lib/message/messageConstructor.d.ts +5 -5
  153. package/lib/modal/index.d.ts +24 -76
  154. package/lib/modal/index.js +1 -1
  155. package/lib/modal/modal.d.ts +9 -29
  156. package/lib/modal/props.mixin.d.ts +4 -12
  157. package/lib/notify/index.js +1 -1
  158. package/lib/notify/notifyConstructor.d.ts +5 -5
  159. package/lib/pagination/index.d.ts +8 -8
  160. package/lib/pagination/pagination.d.ts +4 -4
  161. package/lib/plugin-popover/index.js +1 -1
  162. package/lib/popover/index.d.ts +23 -31
  163. package/lib/popover/index.js +1 -1
  164. package/lib/popover/popover.d.ts +10 -14
  165. package/lib/popover/props.d.ts +4 -6
  166. package/lib/popover/use-floating.d.ts +4 -1
  167. package/lib/progress/index.d.ts +15 -15
  168. package/lib/progress/index.js +1 -1
  169. package/lib/progress/progress.d.ts +7 -7
  170. package/lib/radio/index.d.ts +2 -2
  171. package/lib/radio/radio-button.d.ts +3 -3
  172. package/lib/rate/index.d.ts +4 -4
  173. package/lib/rate/rate.d.ts +2 -2
  174. package/lib/resize-layout/index.d.ts +15 -15
  175. package/lib/resize-layout/resize-layout.d.ts +6 -6
  176. package/lib/select/index.d.ts +51 -92
  177. package/lib/select/index.js +1 -1
  178. package/lib/select/select.d.ts +20 -35
  179. package/lib/select/selectTagInput.d.ts +2 -7
  180. package/lib/shared/index.js +1 -1
  181. package/lib/shared/pop-manager.d.ts +9 -1
  182. package/lib/shared/vue-types.d.ts +85 -7
  183. package/lib/sideslider/index.d.ts +20 -64
  184. package/lib/sideslider/sideslider.d.ts +9 -29
  185. package/lib/slider/index.d.ts +4 -4
  186. package/lib/slider/index.js +1 -1
  187. package/lib/slider/slider-button.d.ts +2 -1
  188. package/lib/slider/slider.d.ts +1 -1
  189. package/lib/steps/index.d.ts +49 -49
  190. package/lib/steps/index.js +1 -1
  191. package/lib/steps/steps.d.ts +31 -31
  192. package/lib/switcher/index.d.ts +9 -20
  193. package/lib/switcher/index.js +1 -1
  194. package/lib/switcher/switcher.d.ts +4 -9
  195. package/lib/tab/index.d.ts +39 -44
  196. package/lib/tab/index.js +1 -1
  197. package/lib/tab/props.d.ts +11 -13
  198. package/lib/tab/tab-nav.d.ts +11 -11
  199. package/lib/tab/tab-panel.d.ts +2 -7
  200. package/lib/tab/tab.d.ts +16 -16
  201. package/lib/table/components/table-column.d.ts +22 -27
  202. package/lib/table/index.d.ts +160 -94
  203. package/lib/table/index.js +1 -1
  204. package/lib/table/props.d.ts +42 -18
  205. package/lib/table/table.d.ts +50 -15
  206. package/lib/table/use-common.d.ts +6 -6
  207. package/lib/table-column/index.d.ts +49 -60
  208. package/lib/table-column/index.js +1 -1
  209. package/lib/tag/index.d.ts +16 -27
  210. package/lib/tag/index.js +1 -1
  211. package/lib/tag/tag.d.ts +7 -12
  212. package/lib/tag-input/index.d.ts +28 -36
  213. package/lib/tag-input/index.js +1 -1
  214. package/lib/tag-input/tag-input.d.ts +13 -17
  215. package/lib/tag-input/tag-props.d.ts +6 -8
  216. package/lib/time-picker/index.d.ts +18 -18
  217. package/lib/tree/constant.d.ts +6 -1
  218. package/lib/tree/index.js +1 -1
  219. package/lib/tree/use-empty.d.ts +1 -1
  220. package/package.json +1 -1
  221. package/lib/dropdown/const.d.ts +0 -4
  222. package/lib/icon/original .js +0 -1
@@ -81,7 +81,7 @@ export declare const datePickerProps: {
81
81
  readonly default: () => {};
82
82
  };
83
83
  readonly fontSize: {
84
- readonly type: PropType<"large" | "normal" | "medium">;
84
+ readonly type: PropType<"normal" | "large" | "medium">;
85
85
  readonly default: "normal";
86
86
  };
87
87
  readonly upToNow: {
@@ -109,7 +109,7 @@ export declare const datePickerProps: {
109
109
  readonly default: false;
110
110
  };
111
111
  readonly behavior: {
112
- readonly type: PropType<"normal" | "simplicity">;
112
+ readonly type: PropType<"simplicity" | "normal">;
113
113
  readonly default: "normal";
114
114
  readonly validator: (v: any) => boolean;
115
115
  };
@@ -107,7 +107,7 @@ declare const _default: import("vue").DefineComponent<{
107
107
  readonly default: () => {};
108
108
  };
109
109
  fontSize: {
110
- readonly type: import("vue").PropType<"large" | "normal" | "medium">;
110
+ readonly type: import("vue").PropType<"normal" | "large" | "medium">;
111
111
  readonly default: "normal";
112
112
  };
113
113
  upToNow: {
@@ -131,7 +131,7 @@ declare const _default: import("vue").DefineComponent<{
131
131
  readonly default: "";
132
132
  };
133
133
  behavior: {
134
- readonly type: import("vue").PropType<"normal" | "simplicity">;
134
+ readonly type: import("vue").PropType<"simplicity" | "normal">;
135
135
  readonly default: "normal";
136
136
  readonly validator: (v: any) => boolean;
137
137
  };
@@ -303,7 +303,7 @@ declare const _default: import("vue").DefineComponent<{
303
303
  readonly default: () => {};
304
304
  };
305
305
  fontSize: {
306
- readonly type: import("vue").PropType<"large" | "normal" | "medium">;
306
+ readonly type: import("vue").PropType<"normal" | "large" | "medium">;
307
307
  readonly default: "normal";
308
308
  };
309
309
  upToNow: {
@@ -327,7 +327,7 @@ declare const _default: import("vue").DefineComponent<{
327
327
  readonly default: "";
328
328
  };
329
329
  behavior: {
330
- readonly type: import("vue").PropType<"normal" | "simplicity">;
330
+ readonly type: import("vue").PropType<"simplicity" | "normal">;
331
331
  readonly default: "normal";
332
332
  readonly validator: (v: any) => boolean;
333
333
  };
@@ -347,17 +347,17 @@ declare const _default: import("vue").DefineComponent<{
347
347
  }, {
348
348
  placement: import("@popperjs/core").ComputedPlacement;
349
349
  options: Record<string, any>;
350
+ behavior: "simplicity" | "normal";
350
351
  type: import("./interface").PickerTypeType;
351
352
  disabled: boolean;
352
353
  width: number;
353
354
  placeholder: string;
354
- transfer: boolean;
355
- fontSize: "large" | "normal" | "medium";
356
355
  open: boolean;
357
356
  multiple: boolean;
357
+ transfer: boolean;
358
+ fontSize: "normal" | "large" | "medium";
358
359
  clearable: boolean;
359
360
  readonly: boolean;
360
- behavior: "normal" | "simplicity";
361
361
  withValidate: boolean;
362
362
  extPopoverCls: string;
363
363
  editable: boolean;
@@ -38,18 +38,14 @@ declare const _default: import("vue").DefineComponent<{
38
38
  } & {
39
39
  default: string;
40
40
  };
41
- headerAlign: import("vue-types").VueTypeDef<string> & {
42
- default: string;
43
- };
44
- footerAlign: import("vue-types").VueTypeDef<string> & {
45
- default: string;
41
+ headerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center">;
42
+ footerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center"> & {
43
+ default: "right" | "left" | "center";
46
44
  };
47
- theme: import("vue-types").VueTypeDef<string> & {
48
- default: string;
49
- };
50
- dialogType: import("vue-types").VueTypeDef<string> & {
51
- default: string;
45
+ theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
46
+ default: "success" | "warning" | "danger" | "primary";
52
47
  };
48
+ dialogType: import("vue-types").VueTypeDef<"show" | "operation" | "confirm" | "process">;
53
49
  isLoading: import("vue-types").VueTypeValidableDef<boolean> & {
54
50
  default: boolean;
55
51
  } & {
@@ -90,9 +86,7 @@ declare const _default: import("vue").DefineComponent<{
90
86
  } & {
91
87
  default: boolean;
92
88
  };
93
- size: import("vue-types").VueTypeDef<string> & {
94
- default: string;
95
- };
89
+ size: import("vue-types").VueTypeDef<"small" | "normal" | "large" | "medium">;
96
90
  draggable: import("vue-types").VueTypeValidableDef<boolean> & {
97
91
  default: boolean;
98
92
  } & {
@@ -122,18 +116,14 @@ declare const _default: import("vue").DefineComponent<{
122
116
  } & {
123
117
  default: string;
124
118
  };
125
- renderDirective: import("vue-types").VueTypeDef<string> & {
126
- default: string;
127
- };
119
+ renderDirective: import("vue-types").VueTypeDef<"if" | "show">;
128
120
  beforeClose: import("vue-types").VueTypeDef<unknown>;
129
121
  multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
130
122
  default: boolean;
131
123
  } & {
132
124
  default: boolean;
133
125
  };
134
- infoType: import("vue-types").VueTypeDef<string> & {
135
- default: string;
136
- };
126
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
137
127
  }, {
138
128
  data: {
139
129
  positionX: number;
@@ -191,18 +181,14 @@ declare const _default: import("vue").DefineComponent<{
191
181
  } & {
192
182
  default: string;
193
183
  };
194
- headerAlign: import("vue-types").VueTypeDef<string> & {
195
- default: string;
196
- };
197
- footerAlign: import("vue-types").VueTypeDef<string> & {
198
- default: string;
184
+ headerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center">;
185
+ footerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center"> & {
186
+ default: "right" | "left" | "center";
199
187
  };
200
- theme: import("vue-types").VueTypeDef<string> & {
201
- default: string;
202
- };
203
- dialogType: import("vue-types").VueTypeDef<string> & {
204
- default: string;
188
+ theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
189
+ default: "success" | "warning" | "danger" | "primary";
205
190
  };
191
+ dialogType: import("vue-types").VueTypeDef<"show" | "operation" | "confirm" | "process">;
206
192
  isLoading: import("vue-types").VueTypeValidableDef<boolean> & {
207
193
  default: boolean;
208
194
  } & {
@@ -243,9 +229,7 @@ declare const _default: import("vue").DefineComponent<{
243
229
  } & {
244
230
  default: boolean;
245
231
  };
246
- size: import("vue-types").VueTypeDef<string> & {
247
- default: string;
248
- };
232
+ size: import("vue-types").VueTypeDef<"small" | "normal" | "large" | "medium">;
249
233
  draggable: import("vue-types").VueTypeValidableDef<boolean> & {
250
234
  default: boolean;
251
235
  } & {
@@ -275,18 +259,14 @@ declare const _default: import("vue").DefineComponent<{
275
259
  } & {
276
260
  default: string;
277
261
  };
278
- renderDirective: import("vue-types").VueTypeDef<string> & {
279
- default: string;
280
- };
262
+ renderDirective: import("vue-types").VueTypeDef<"if" | "show">;
281
263
  beforeClose: import("vue-types").VueTypeDef<unknown>;
282
264
  multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
283
265
  default: boolean;
284
266
  } & {
285
267
  default: boolean;
286
268
  };
287
- infoType: import("vue-types").VueTypeDef<string> & {
288
- default: string;
289
- };
269
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
290
270
  }>> & {
291
271
  onConfirm?: (...args: any[]) => any;
292
272
  onPrev?: (...args: any[]) => any;
@@ -299,33 +279,28 @@ declare const _default: import("vue").DefineComponent<{
299
279
  multiInstance: boolean;
300
280
  zIndex: string | number;
301
281
  showMask: boolean;
302
- theme: string;
282
+ direction: string;
283
+ theme: "success" | "warning" | "danger" | "primary";
303
284
  extCls: string | unknown[];
304
285
  width: string | number;
305
286
  height: string | number;
306
287
  isShow: boolean;
307
288
  draggable: boolean;
308
289
  transfer: boolean;
309
- size: string;
310
- direction: string;
311
290
  maxHeight: string;
312
- renderDirective: string;
313
- dialogType: string;
314
- infoType: string;
315
291
  quickClose: boolean;
316
292
  scrollable: boolean;
317
293
  closeIcon: boolean;
318
294
  escClose: boolean;
319
295
  fullscreen: boolean;
320
296
  animateType: string;
321
- headerAlign: string;
322
- footerAlign: string;
323
297
  confirmText: string;
324
298
  cancelText: string;
325
299
  prevText: string;
326
300
  nextText: string;
327
301
  current: number;
328
302
  totalStep: number;
303
+ footerAlign: "right" | "left" | "center";
329
304
  isLoading: boolean;
330
305
  }>;
331
306
  export default _default;
@@ -7,33 +7,28 @@ declare const BkDialog: {
7
7
  multiInstance: boolean;
8
8
  zIndex: string | number;
9
9
  showMask: boolean;
10
- theme: string;
10
+ direction: string;
11
+ theme: "success" | "warning" | "danger" | "primary";
11
12
  extCls: string | unknown[];
12
13
  width: string | number;
13
14
  height: string | number;
14
15
  isShow: boolean;
15
16
  draggable: boolean;
16
17
  transfer: boolean;
17
- size: string;
18
- direction: string;
19
18
  maxHeight: string;
20
- renderDirective: string;
21
- dialogType: string;
22
- infoType: string;
23
19
  quickClose: boolean;
24
20
  scrollable: boolean;
25
21
  closeIcon: boolean;
26
22
  escClose: boolean;
27
23
  fullscreen: boolean;
28
24
  animateType: string;
29
- headerAlign: string;
30
- footerAlign: string;
31
25
  confirmText: string;
32
26
  cancelText: string;
33
27
  prevText: string;
34
28
  nextText: string;
35
29
  current: number;
36
30
  totalStep: number;
31
+ footerAlign: "right" | "left" | "center";
37
32
  isLoading: boolean;
38
33
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
39
34
  width: import("vue-types").VueTypeDef<string | number> & {
@@ -75,18 +70,14 @@ declare const BkDialog: {
75
70
  } & {
76
71
  default: string;
77
72
  };
78
- headerAlign: import("vue-types").VueTypeDef<string> & {
79
- default: string;
80
- };
81
- footerAlign: import("vue-types").VueTypeDef<string> & {
82
- default: string;
83
- };
84
- theme: import("vue-types").VueTypeDef<string> & {
85
- default: string;
73
+ headerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center">;
74
+ footerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center"> & {
75
+ default: "right" | "left" | "center";
86
76
  };
87
- dialogType: import("vue-types").VueTypeDef<string> & {
88
- default: string;
77
+ theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
78
+ default: "success" | "warning" | "danger" | "primary";
89
79
  };
80
+ dialogType: import("vue-types").VueTypeDef<"show" | "operation" | "confirm" | "process">;
90
81
  isLoading: import("vue-types").VueTypeValidableDef<boolean> & {
91
82
  default: boolean;
92
83
  } & {
@@ -127,9 +118,7 @@ declare const BkDialog: {
127
118
  } & {
128
119
  default: boolean;
129
120
  };
130
- size: import("vue-types").VueTypeDef<string> & {
131
- default: string;
132
- };
121
+ size: import("vue-types").VueTypeDef<"small" | "normal" | "large" | "medium">;
133
122
  draggable: import("vue-types").VueTypeValidableDef<boolean> & {
134
123
  default: boolean;
135
124
  } & {
@@ -159,18 +148,14 @@ declare const BkDialog: {
159
148
  } & {
160
149
  default: string;
161
150
  };
162
- renderDirective: import("vue-types").VueTypeDef<string> & {
163
- default: string;
164
- };
151
+ renderDirective: import("vue-types").VueTypeDef<"if" | "show">;
165
152
  beforeClose: import("vue-types").VueTypeDef<unknown>;
166
153
  multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
167
154
  default: boolean;
168
155
  } & {
169
156
  default: boolean;
170
157
  };
171
- infoType: import("vue-types").VueTypeDef<string> & {
172
- default: string;
173
- };
158
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
174
159
  }>> & {
175
160
  onConfirm?: (...args: any[]) => any;
176
161
  onPrev?: (...args: any[]) => any;
@@ -178,7 +163,7 @@ declare const BkDialog: {
178
163
  onClosed?: (...args: any[]) => any;
179
164
  "onUpdate:isShow"?: (...args: any[]) => any;
180
165
  "onValue-change"?: (...args: any[]) => any;
181
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "multiInstance" | "zIndex" | "showMask" | "theme" | "extCls" | "width" | "height" | "isShow" | "draggable" | "transfer" | "size" | "direction" | "maxHeight" | "renderDirective" | "dialogType" | "infoType" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType" | "headerAlign" | "footerAlign" | "confirmText" | "cancelText" | "prevText" | "nextText" | "current" | "totalStep" | "isLoading">;
166
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "multiInstance" | "zIndex" | "showMask" | "direction" | "theme" | "extCls" | "width" | "height" | "isShow" | "draggable" | "transfer" | "maxHeight" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType" | "confirmText" | "cancelText" | "prevText" | "nextText" | "current" | "totalStep" | "footerAlign" | "isLoading">;
182
167
  $attrs: {
183
168
  [x: string]: unknown;
184
169
  };
@@ -232,18 +217,14 @@ declare const BkDialog: {
232
217
  } & {
233
218
  default: string;
234
219
  };
235
- headerAlign: import("vue-types").VueTypeDef<string> & {
236
- default: string;
237
- };
238
- footerAlign: import("vue-types").VueTypeDef<string> & {
239
- default: string;
220
+ headerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center">;
221
+ footerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center"> & {
222
+ default: "right" | "left" | "center";
240
223
  };
241
- theme: import("vue-types").VueTypeDef<string> & {
242
- default: string;
243
- };
244
- dialogType: import("vue-types").VueTypeDef<string> & {
245
- default: string;
224
+ theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
225
+ default: "success" | "warning" | "danger" | "primary";
246
226
  };
227
+ dialogType: import("vue-types").VueTypeDef<"show" | "operation" | "confirm" | "process">;
247
228
  isLoading: import("vue-types").VueTypeValidableDef<boolean> & {
248
229
  default: boolean;
249
230
  } & {
@@ -284,9 +265,7 @@ declare const BkDialog: {
284
265
  } & {
285
266
  default: boolean;
286
267
  };
287
- size: import("vue-types").VueTypeDef<string> & {
288
- default: string;
289
- };
268
+ size: import("vue-types").VueTypeDef<"small" | "normal" | "large" | "medium">;
290
269
  draggable: import("vue-types").VueTypeValidableDef<boolean> & {
291
270
  default: boolean;
292
271
  } & {
@@ -316,18 +295,14 @@ declare const BkDialog: {
316
295
  } & {
317
296
  default: string;
318
297
  };
319
- renderDirective: import("vue-types").VueTypeDef<string> & {
320
- default: string;
321
- };
298
+ renderDirective: import("vue-types").VueTypeDef<"if" | "show">;
322
299
  beforeClose: import("vue-types").VueTypeDef<unknown>;
323
300
  multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
324
301
  default: boolean;
325
302
  } & {
326
303
  default: boolean;
327
304
  };
328
- infoType: import("vue-types").VueTypeDef<string> & {
329
- default: string;
330
- };
305
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
331
306
  }>> & {
332
307
  onConfirm?: (...args: any[]) => any;
333
308
  onPrev?: (...args: any[]) => any;
@@ -357,33 +332,28 @@ declare const BkDialog: {
357
332
  multiInstance: boolean;
358
333
  zIndex: string | number;
359
334
  showMask: boolean;
360
- theme: string;
335
+ direction: string;
336
+ theme: "success" | "warning" | "danger" | "primary";
361
337
  extCls: string | unknown[];
362
338
  width: string | number;
363
339
  height: string | number;
364
340
  isShow: boolean;
365
341
  draggable: boolean;
366
342
  transfer: boolean;
367
- size: string;
368
- direction: string;
369
343
  maxHeight: string;
370
- renderDirective: string;
371
- dialogType: string;
372
- infoType: string;
373
344
  quickClose: boolean;
374
345
  scrollable: boolean;
375
346
  closeIcon: boolean;
376
347
  escClose: boolean;
377
348
  fullscreen: boolean;
378
349
  animateType: string;
379
- headerAlign: string;
380
- footerAlign: string;
381
350
  confirmText: string;
382
351
  cancelText: string;
383
352
  prevText: string;
384
353
  nextText: string;
385
354
  current: number;
386
355
  totalStep: number;
356
+ footerAlign: "right" | "left" | "center";
387
357
  isLoading: boolean;
388
358
  }> & {
389
359
  beforeCreate?: (() => void) | (() => void)[];
@@ -445,18 +415,14 @@ declare const BkDialog: {
445
415
  } & {
446
416
  default: string;
447
417
  };
448
- headerAlign: import("vue-types").VueTypeDef<string> & {
449
- default: string;
450
- };
451
- footerAlign: import("vue-types").VueTypeDef<string> & {
452
- default: string;
418
+ headerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center">;
419
+ footerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center"> & {
420
+ default: "right" | "left" | "center";
453
421
  };
454
- theme: import("vue-types").VueTypeDef<string> & {
455
- default: string;
456
- };
457
- dialogType: import("vue-types").VueTypeDef<string> & {
458
- default: string;
422
+ theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
423
+ default: "success" | "warning" | "danger" | "primary";
459
424
  };
425
+ dialogType: import("vue-types").VueTypeDef<"show" | "operation" | "confirm" | "process">;
460
426
  isLoading: import("vue-types").VueTypeValidableDef<boolean> & {
461
427
  default: boolean;
462
428
  } & {
@@ -497,9 +463,7 @@ declare const BkDialog: {
497
463
  } & {
498
464
  default: boolean;
499
465
  };
500
- size: import("vue-types").VueTypeDef<string> & {
501
- default: string;
502
- };
466
+ size: import("vue-types").VueTypeDef<"small" | "normal" | "large" | "medium">;
503
467
  draggable: import("vue-types").VueTypeValidableDef<boolean> & {
504
468
  default: boolean;
505
469
  } & {
@@ -529,18 +493,14 @@ declare const BkDialog: {
529
493
  } & {
530
494
  default: string;
531
495
  };
532
- renderDirective: import("vue-types").VueTypeDef<string> & {
533
- default: string;
534
- };
496
+ renderDirective: import("vue-types").VueTypeDef<"if" | "show">;
535
497
  beforeClose: import("vue-types").VueTypeDef<unknown>;
536
498
  multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
537
499
  default: boolean;
538
500
  } & {
539
501
  default: boolean;
540
502
  };
541
- infoType: import("vue-types").VueTypeDef<string> & {
542
- default: string;
543
- };
503
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
544
504
  }>> & {
545
505
  onConfirm?: (...args: any[]) => any;
546
506
  onPrev?: (...args: any[]) => any;
@@ -609,18 +569,14 @@ declare const BkDialog: {
609
569
  } & {
610
570
  default: string;
611
571
  };
612
- headerAlign: import("vue-types").VueTypeDef<string> & {
613
- default: string;
572
+ headerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center">;
573
+ footerAlign: import("vue-types").VueTypeDef<"right" | "left" | "center"> & {
574
+ default: "right" | "left" | "center";
614
575
  };
615
- footerAlign: import("vue-types").VueTypeDef<string> & {
616
- default: string;
617
- };
618
- theme: import("vue-types").VueTypeDef<string> & {
619
- default: string;
620
- };
621
- dialogType: import("vue-types").VueTypeDef<string> & {
622
- default: string;
576
+ theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
577
+ default: "success" | "warning" | "danger" | "primary";
623
578
  };
579
+ dialogType: import("vue-types").VueTypeDef<"show" | "operation" | "confirm" | "process">;
624
580
  isLoading: import("vue-types").VueTypeValidableDef<boolean> & {
625
581
  default: boolean;
626
582
  } & {
@@ -661,9 +617,7 @@ declare const BkDialog: {
661
617
  } & {
662
618
  default: boolean;
663
619
  };
664
- size: import("vue-types").VueTypeDef<string> & {
665
- default: string;
666
- };
620
+ size: import("vue-types").VueTypeDef<"small" | "normal" | "large" | "medium">;
667
621
  draggable: import("vue-types").VueTypeValidableDef<boolean> & {
668
622
  default: boolean;
669
623
  } & {
@@ -693,18 +647,14 @@ declare const BkDialog: {
693
647
  } & {
694
648
  default: string;
695
649
  };
696
- renderDirective: import("vue-types").VueTypeDef<string> & {
697
- default: string;
698
- };
650
+ renderDirective: import("vue-types").VueTypeDef<"if" | "show">;
699
651
  beforeClose: import("vue-types").VueTypeDef<unknown>;
700
652
  multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
701
653
  default: boolean;
702
654
  } & {
703
655
  default: boolean;
704
656
  };
705
- infoType: import("vue-types").VueTypeDef<string> & {
706
- default: string;
707
- };
657
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
708
658
  }>> & {
709
659
  onConfirm?: (...args: any[]) => any;
710
660
  onPrev?: (...args: any[]) => any;
@@ -734,33 +684,28 @@ declare const BkDialog: {
734
684
  multiInstance: boolean;
735
685
  zIndex: string | number;
736
686
  showMask: boolean;
737
- theme: string;
687
+ direction: string;
688
+ theme: "success" | "warning" | "danger" | "primary";
738
689
  extCls: string | unknown[];
739
690
  width: string | number;
740
691
  height: string | number;
741
692
  isShow: boolean;
742
693
  draggable: boolean;
743
694
  transfer: boolean;
744
- size: string;
745
- direction: string;
746
695
  maxHeight: string;
747
- renderDirective: string;
748
- dialogType: string;
749
- infoType: string;
750
696
  quickClose: boolean;
751
697
  scrollable: boolean;
752
698
  closeIcon: boolean;
753
699
  escClose: boolean;
754
700
  fullscreen: boolean;
755
701
  animateType: string;
756
- headerAlign: string;
757
- footerAlign: string;
758
702
  confirmText: string;
759
703
  cancelText: string;
760
704
  prevText: string;
761
705
  nextText: string;
762
706
  current: number;
763
707
  totalStep: number;
708
+ footerAlign: "right" | "left" | "center";
764
709
  isLoading: boolean;
765
710
  }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
766
711
  export default BkDialog;
@@ -1 +1 @@
1
- !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"),require("../button"),require("../icon"),require("../modal"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../button","../icon","../modal"],o);else{var t="object"==typeof exports?o(require("../shared"),require("vue"),require("../button"),require("../icon"),require("../modal")):o(e["../shared"],e.vue,e["../button"],e["../icon"],e["../modal"]);for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(self,((e,o,t,n,r)=>(()=>{"use strict";var i={4976:e=>{e.exports=t},6870:e=>{e.exports=n},8014:e=>{e.exports=r},4212:o=>{o.exports=e},748:e=>{e.exports=o}},l={};function a(e){var o=l[e];if(void 0!==o)return o.exports;var t=l[e]={exports:{}};return i[e](t,t.exports,a),t.exports}a.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return a.d(o,{a:o}),o},a.d=(e,o)=>{for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{a.r(c),a.d(c,{default:()=>u});var e=a(4212),o=a(748),t=a(4976),n=a.n(t),r=a(6870),i=a(8014),l=a.n(i);const s=Object.assign(Object.assign({},i.propsMixin),{width:e.PropTypes.oneOfType([String,Number]).def(""),height:e.PropTypes.oneOfType([String,Number]).def(""),confirmText:e.PropTypes.string.def("确定"),cancelText:e.PropTypes.string.def("取消"),prevText:e.PropTypes.string.def("上一步"),nextText:e.PropTypes.string.def("下一步"),current:e.PropTypes.number.def(1),totalStep:e.PropTypes.number,title:e.PropTypes.string.def("title"),headerAlign:e.PropTypes.commonType(["left","center","right"],"headerAlign").def("left"),footerAlign:e.PropTypes.commonType(["left","center","right"],"footerAlign").def("right"),theme:e.PropTypes.commonType(["primary","warning","success","danger"],"theme").def("primary"),dialogType:e.PropTypes.commonType(["show","operation","confirm","process"],"dialogType").def("operation"),isLoading:e.PropTypes.bool.def(!1)}),d=(0,o.defineComponent)({name:"Dialog",components:{BkModal:l(),BkButton:n()},props:s,emits:["closed","update:isShow","confirm","prev","next","value-change"],setup:function(e,t){var n=t.emit,r=(0,o.reactive)({positionX:0,positionY:0,moveStyle:{top:"",left:""}}),i=(0,o.ref)(e.isShow);(0,o.onMounted)((function(){e.escClose&&addEventListener("keydown",c)})),(0,o.onBeforeUnmount)((function(){e.escClose&&removeEventListener("keydown",c)})),(0,o.watch)((function(){return e.isShow}),(function(e){e?i.value=!0:setTimeout((function(){r.moveStyle={top:"50%",left:"50%"},r.positionX=0,r.positionY=0,i.value=!1}),250),n("value-change",e)}));var l=function(){n("update:isShow",!1),n("closed"),i.value=!1},a=(0,o.computed)((function(){return["process","operation","confirm"].includes(e.dialogType)})),c=function(o){e.isShow&&e.closeIcon&&27===o.keyCode&&l()};return{data:r,handleClose:l,handleConfirm:function(){n("update:isShow",!1),n("confirm"),i.value=!1},escCloseHandler:c,moveHandler:function(o){if(e.fullscreen)return!1;if(!e.draggable)return!1;var t,n,i=o.target,l=o.currentTarget.parentNode.parentNode.offsetHeight,a=o.currentTarget.parentNode.parentNode.offsetWidth;0!==r.positionX&&0!==r.positionY?(t=o.clientX-r.positionX,n=o.clientY-r.positionY):(t=o.clientX-i.offsetLeft,n=o.clientY-i.offsetTop),document.onmousemove=function(e){var o=window.innerWidth-a,i=window.innerHeight-l,c=e.clientX-t,s=e.clientY-n;o/2-c<=0?c=o/2:o/2+c<=0&&(c=-o/2),i/2-s<=0?s=i/2:i/2+s<=0&&(s=-i/2),r.positionX=c,r.positionY=s,r.moveStyle.left="calc(50% + ".concat(c,"px)"),r.moveStyle.top="calc(50% + ".concat(s,"px)")},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}},handlePrevStep:function(){n("prev")},handleNextStep:function(){n("next")},hasFooter:a,isModalShow:i}},render:function(){var e,t=this,i={header:function(){var e,n,i,l,a,c;return[(0,o.createVNode)("div",{class:["bk-dialog-tool",t.fullscreen||!t.draggable?"":"move",t.draggable?"content-dragging":""],onMousedown:t.moveHandler},[null!==(i=null===(n=(e=t.$slots).tools)||void 0===n?void 0:n.call(e))&&void 0!==i?i:""]),(0,o.createVNode)("div",{class:"bk-dialog-header"},[(0,o.createVNode)("div",{class:"bk-header-icon"},[t.infoType?{loading:(0,o.createVNode)(r.Spinner,{class:"bk-info-icon primary"},null),warning:(0,o.createVNode)(r.Warn,{class:"bk-info-icon warning"},null),success:(0,o.createVNode)(r.Success,{class:"bk-info-icon success"},null),danger:(0,o.createVNode)(r.Close,{class:"bk-info-icon danger"},null)}[t.infoType]:(0,o.createVNode)("slot",{name:"info-icon"},null)]),(0,o.createVNode)("span",{class:"bk-dialog-title",style:"text-align: ".concat(t.headerAlign)},[null!==(c=null===(a=(l=t.$slots).header)||void 0===a?void 0:a.call(l))&&void 0!==c?c:t.title])])]},default:function(){var e,o,n;return null!==(n=null===(o=(e=t.$slots).default)||void 0===o?void 0:o.call(e))&&void 0!==n?n:"default"},footer:function(){var e,r,i,l,a,c,s,d,u;return(0,o.createVNode)("div",{class:"bk-dialog-footer",style:"text-align: ".concat(t.footerAlign)},["process"===t.dialogType?null!==(i=null===(r=(e=t.$slots).footer)||void 0===r?void 0:r.call(e))&&void 0!==i?i:(0,o.createVNode)(o.Fragment,null,[1===t.current?"":(0,o.createVNode)(n(),{class:"bk-dialog-perv",onClick:t.handlePrevStep},{default:function(){return[t.prevText]}}),t.current===t.totalStep?"":(0,o.createVNode)(n(),{class:"bk-dialog-next",onClick:t.handleNextStep},{default:function(){return[t.nextText]}}),t.current===t.totalStep?(0,o.createVNode)(n(),{onClick:t.handleConfirm,theme:t.theme,loading:t.isLoading},{default:function(){return[t.confirmText]}}):"",(0,o.createVNode)(n(),{class:"bk-dialog-cancel",onClick:t.handleClose,disabled:t.isLoading},{default:function(){return[t.cancelText]}})]):"","operation"===t.dialogType?null!==(c=null===(a=(l=t.$slots).footer)||void 0===a?void 0:a.call(l))&&void 0!==c?c:(0,o.createVNode)(o.Fragment,null,[(0,o.createVNode)(n(),{onClick:t.handleConfirm,theme:t.theme,loading:t.isLoading},{default:function(){return[t.confirmText]}}),(0,o.createVNode)(n(),{class:"bk-dialog-cancel",onClick:t.handleClose,disabled:t.isLoading},{default:function(){return[t.cancelText]}})]):"","confirm"===t.dialogType?null!==(u=null===(d=(s=t.$slots).footer)||void 0===d?void 0:d.call(s))&&void 0!==u?u:(0,o.createVNode)(o.Fragment,null,[(0,o.createVNode)(n(),{onClick:t.handleConfirm,theme:t.theme,loading:t.isLoading},{default:function(){return[t.confirmText]}})]):""])},close:function(){return(0,o.createVNode)("span",{class:"bk-dialog-close",onClick:t.handleClose},[(0,o.createTextVNode)("+")])}},a="bk-dialog-wrapper ".concat(this.scrollable?"scroll-able":""," ").concat(this.multiInstance?"multi-instance":""," ").concat(this.hasFooter?"has-footer":"no-footer");return(0,o.createVNode)(l(),(0,o.mergeProps)(this.$props,{class:a,onClose:this.handleClose,isShow:this.isModalShow,style:this.data.moveStyle}),"function"==typeof(e=i)||"[object Object]"===Object.prototype.toString.call(e)&&!(0,o.isVNode)(e)?i:{default:function(){return[i]}})}}),u=(0,e.withInstall)(d)})(),c})()));
1
+ !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"),require("../button"),require("../icon"),require("../modal"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../button","../icon","../modal","vue-types"],o);else{var t="object"==typeof exports?o(require("../shared"),require("vue"),require("../button"),require("../icon"),require("../modal"),require("vue-types")):o(e["../shared"],e.vue,e["../button"],e["../icon"],e["../modal"],e["vue-types"]);for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(self,((e,o,t,n,r,i)=>(()=>{"use strict";var l={4976:e=>{e.exports=t},6870:e=>{e.exports=n},8014:e=>{e.exports=r},4212:o=>{o.exports=e},748:e=>{e.exports=o},210:e=>{e.exports=i}},a={};function c(e){var o=a[e];if(void 0!==o)return o.exports;var t=a[e]={exports:{}};return l[e](t,t.exports,c),t.exports}c.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return c.d(o,{a:o}),o},c.d=(e,o)=>{for(var t in o)c.o(o,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},c.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{c.r(s),c.d(s,{default:()=>C});var e,o,t,n,r,i,l,a,d=c(4212),u=c(748),f=c(4976),p=c.n(f),T=c(6870),g=c(8014),m=c.n(g),v=c(210);(0,v.createTypes)({}),function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(e||(e={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(o||(o={})),function(e){e.IF="if",e.SHOW="show"}(t||(t={})),(0,v.toType)("renderDirective",{default:t.SHOW}),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(n||(n={})),(0,v.toType)("align",{default:n.LEFT}),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(r||(r={})),function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(i||(i={})),(0,v.toType)("placement",{}).def(i.BOTTOM),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(l||(l={})),(0,v.toType)("trigger",{}).def(l.HOVER),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(a||(a={}));var h,y,b,N,S=(0,v.toType)("dialogType",{default:a.OPERATION});!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(h||(h={})),(0,v.toType)("direction",{}).def(h.HORIZONTAL),function(e){e.DASHED="dashed",e.SOLID="solid"}(y||(y={})),(0,v.toType)("lineType",{}).def(y.DASHED),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(b||(b={})),(0,v.toType)("tagTheme",{}),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(N||(N={})),(0,v.toType)("behavior",{}).def(N.NORMAL);const O=Object.assign(Object.assign({},g.propsMixin),{width:d.PropTypes.oneOfType([String,Number]).def(""),height:d.PropTypes.oneOfType([String,Number]).def(""),confirmText:d.PropTypes.string.def("确定"),cancelText:d.PropTypes.string.def("取消"),prevText:d.PropTypes.string.def("上一步"),nextText:d.PropTypes.string.def("下一步"),current:d.PropTypes.number.def(1),totalStep:d.PropTypes.number,title:d.PropTypes.string.def("title"),headerAlign:d.alignType,footerAlign:d.alignType.def(n.RIGHT),theme:d.PropTypes.theme().def(r.PRIMARY),dialogType:S,isLoading:d.PropTypes.bool.def(!1)}),x=(0,u.defineComponent)({name:"Dialog",components:{BkModal:m(),BkButton:p()},props:O,emits:["closed","update:isShow","confirm","prev","next","value-change"],setup:function(e,o){var t=o.emit,n=(0,u.reactive)({positionX:0,positionY:0,moveStyle:{top:"",left:""}}),r=(0,u.ref)(e.isShow);(0,u.onMounted)((function(){e.escClose&&addEventListener("keydown",a)})),(0,u.onBeforeUnmount)((function(){e.escClose&&removeEventListener("keydown",a)})),(0,u.watch)((function(){return e.isShow}),(function(e){e?r.value=!0:setTimeout((function(){n.moveStyle={top:"50%",left:"50%"},n.positionX=0,n.positionY=0,r.value=!1}),250),t("value-change",e)}));var i=function(){t("update:isShow",!1),t("closed"),r.value=!1},l=(0,u.computed)((function(){return["process","operation","confirm"].includes(e.dialogType)})),a=function(o){e.isShow&&e.closeIcon&&27===o.keyCode&&i()};return{data:n,handleClose:i,handleConfirm:function(){t("update:isShow",!1),t("confirm"),r.value=!1},escCloseHandler:a,moveHandler:function(o){if(e.fullscreen)return!1;if(!e.draggable)return!1;var t,r,i=o.target,l=o.currentTarget.parentNode.parentNode.offsetHeight,a=o.currentTarget.parentNode.parentNode.offsetWidth;0!==n.positionX&&0!==n.positionY?(t=o.clientX-n.positionX,r=o.clientY-n.positionY):(t=o.clientX-i.offsetLeft,r=o.clientY-i.offsetTop),document.onmousemove=function(e){var o=window.innerWidth-a,i=window.innerHeight-l,c=e.clientX-t,s=e.clientY-r;o/2-c<=0?c=o/2:o/2+c<=0&&(c=-o/2),i/2-s<=0?s=i/2:i/2+s<=0&&(s=-i/2),n.positionX=c,n.positionY=s,n.moveStyle.left="calc(50% + ".concat(c,"px)"),n.moveStyle.top="calc(50% + ".concat(s,"px)")},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}},handlePrevStep:function(){t("prev")},handleNextStep:function(){t("next")},hasFooter:l,isModalShow:r}},render:function(){var e,o=this,t={header:function(){var e,t,n,r,i,l;return[(0,u.createVNode)("div",{class:["bk-dialog-tool",o.fullscreen||!o.draggable?"":"move",o.draggable?"content-dragging":""],onMousedown:o.moveHandler},[null!==(n=null===(t=(e=o.$slots).tools)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""]),(0,u.createVNode)("div",{class:"bk-dialog-header"},[(0,u.createVNode)("div",{class:"bk-header-icon"},[o.infoType?{loading:(0,u.createVNode)(T.Spinner,{class:"bk-info-icon primary"},null),warning:(0,u.createVNode)(T.Warn,{class:"bk-info-icon warning"},null),success:(0,u.createVNode)(T.Success,{class:"bk-info-icon success"},null),danger:(0,u.createVNode)(T.Close,{class:"bk-info-icon danger"},null)}[o.infoType]:(0,u.createVNode)("slot",{name:"info-icon"},null)]),(0,u.createVNode)("span",{class:"bk-dialog-title",style:"text-align: ".concat(o.headerAlign)},[null!==(l=null===(i=(r=o.$slots).header)||void 0===i?void 0:i.call(r))&&void 0!==l?l:o.title])])]},default:function(){var e,t,n;return null!==(n=null===(t=(e=o.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:"default"},footer:function(){var e,t,n,r,i,l,a,c,s;return(0,u.createVNode)("div",{class:"bk-dialog-footer",style:"text-align: ".concat(o.footerAlign)},["process"===o.dialogType?null!==(n=null===(t=(e=o.$slots).footer)||void 0===t?void 0:t.call(e))&&void 0!==n?n:(0,u.createVNode)(u.Fragment,null,[1===o.current?"":(0,u.createVNode)(p(),{class:"bk-dialog-perv",onClick:o.handlePrevStep},{default:function(){return[o.prevText]}}),o.current===o.totalStep?"":(0,u.createVNode)(p(),{class:"bk-dialog-next",onClick:o.handleNextStep},{default:function(){return[o.nextText]}}),o.current===o.totalStep?(0,u.createVNode)(p(),{onClick:o.handleConfirm,theme:o.theme,loading:o.isLoading},{default:function(){return[o.confirmText]}}):"",(0,u.createVNode)(p(),{class:"bk-dialog-cancel",onClick:o.handleClose,disabled:o.isLoading},{default:function(){return[o.cancelText]}})]):"","operation"===o.dialogType?null!==(l=null===(i=(r=o.$slots).footer)||void 0===i?void 0:i.call(r))&&void 0!==l?l:(0,u.createVNode)(u.Fragment,null,[(0,u.createVNode)(p(),{onClick:o.handleConfirm,theme:o.theme,loading:o.isLoading},{default:function(){return[o.confirmText]}}),(0,u.createVNode)(p(),{class:"bk-dialog-cancel",onClick:o.handleClose,disabled:o.isLoading},{default:function(){return[o.cancelText]}})]):"","confirm"===o.dialogType?null!==(s=null===(c=(a=o.$slots).footer)||void 0===c?void 0:c.call(a))&&void 0!==s?s:(0,u.createVNode)(u.Fragment,null,[(0,u.createVNode)(p(),{onClick:o.handleConfirm,theme:o.theme,loading:o.isLoading},{default:function(){return[o.confirmText]}})]):""])},close:function(){return(0,u.createVNode)("span",{class:"bk-dialog-close",onClick:o.handleClose},[(0,u.createTextVNode)("+")])}},n="bk-dialog-wrapper ".concat(this.scrollable?"scroll-able":""," ").concat(this.multiInstance?"multi-instance":""," ").concat(this.hasFooter?"has-footer":"no-footer");return(0,u.createVNode)(m(),(0,u.mergeProps)(this.$props,{class:n,onClose:this.handleClose,isShow:this.isModalShow,style:this.data.moveStyle}),"function"==typeof(e=t)||"[object Object]"===Object.prototype.toString.call(e)&&!(0,u.isVNode)(e)?t:{default:function(){return[t]}})}}),C=(0,d.withInstall)(x)})(),s})()));