@farris/ui-vue 1.2.9 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/components/accordion/index.esm.js +63 -63
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +402 -323
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +98 -96
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +66 -66
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +118 -118
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +539 -460
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +135 -135
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1007 -312
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +97 -97
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +778 -700
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +472 -329
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2231 -1055
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +79 -79
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6408 -5034
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4762 -3511
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3442 -2742
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-outline/index.esm.js +14 -13
  40. package/components/designer-outline/index.umd.cjs +1 -1
  41. package/components/dropdown/index.esm.js +73 -73
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.css +1 -0
  44. package/components/dynamic-form/index.esm.js +2597 -1141
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-resolver/index.esm.js +114 -71
  47. package/components/dynamic-resolver/index.umd.cjs +1 -1
  48. package/components/dynamic-view/index.esm.js +303 -290
  49. package/components/dynamic-view/index.umd.cjs +1 -1
  50. package/components/events-editor/index.esm.js +171 -171
  51. package/components/events-editor/index.umd.cjs +1 -1
  52. package/components/expression-editor/index.esm.js +65 -65
  53. package/components/expression-editor/index.umd.cjs +1 -1
  54. package/components/external-container/index.css +1 -1
  55. package/components/external-container/index.esm.js +3075 -2586
  56. package/components/external-container/index.umd.cjs +1 -1
  57. package/components/field-selector/index.css +1 -1
  58. package/components/field-selector/index.esm.js +5272 -8511
  59. package/components/field-selector/index.umd.cjs +1 -1
  60. package/components/filter-bar/index.css +1 -1
  61. package/components/filter-bar/index.esm.js +1726 -1822
  62. package/components/filter-bar/index.umd.cjs +1 -1
  63. package/components/image-cropper/index.esm.js +126 -126
  64. package/components/image-cropper/index.umd.cjs +1 -1
  65. package/components/input-group/index.esm.js +620 -540
  66. package/components/input-group/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +88 -88
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +71 -71
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.css +1 -1
  72. package/components/list-view/index.esm.js +3582 -2356
  73. package/components/list-view/index.umd.cjs +1 -1
  74. package/components/lookup/index.css +1 -1
  75. package/components/lookup/index.esm.js +10752 -8972
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.css +1 -1
  78. package/components/mapping-editor/index.esm.js +5601 -5329
  79. package/components/mapping-editor/index.umd.cjs +1 -1
  80. package/components/message-box/index.css +1 -1
  81. package/components/message-box/index.esm.js +511 -471
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.css +1 -1
  84. package/components/modal/index.esm.js +438 -398
  85. package/components/modal/index.umd.cjs +1 -1
  86. package/components/nav/index.esm.js +535 -452
  87. package/components/nav/index.umd.cjs +2 -2
  88. package/components/notify/index.esm.js +59 -53
  89. package/components/notify/index.umd.cjs +1 -1
  90. package/components/number-range/index.esm.js +556 -477
  91. package/components/number-range/index.umd.cjs +1 -1
  92. package/components/number-spinner/index.esm.js +504 -425
  93. package/components/number-spinner/index.umd.cjs +1 -1
  94. package/components/order/index.css +1 -1
  95. package/components/order/index.esm.js +1833 -1054
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +100 -100
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +899 -870
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +576 -487
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/popover/index.esm.js +71 -70
  104. package/components/popover/index.umd.cjs +1 -1
  105. package/components/progress/index.esm.js +73 -73
  106. package/components/progress/index.umd.cjs +2 -2
  107. package/components/property-editor/index.css +1 -1
  108. package/components/property-editor/index.esm.js +1916 -1220
  109. package/components/property-editor/index.umd.cjs +3 -3
  110. package/components/property-panel/index.esm.js +783 -886
  111. package/components/property-panel/index.umd.cjs +1 -1
  112. package/components/query-solution/index.css +1 -1
  113. package/components/query-solution/index.esm.js +3632 -2556
  114. package/components/query-solution/index.umd.cjs +1 -1
  115. package/components/radio-button/index.esm.js +72 -72
  116. package/components/radio-button/index.umd.cjs +1 -1
  117. package/components/radio-group/index.esm.js +484 -405
  118. package/components/radio-group/index.umd.cjs +1 -1
  119. package/components/rate/index.esm.js +152 -152
  120. package/components/rate/index.umd.cjs +1 -1
  121. package/components/response-layout/index.esm.js +73 -73
  122. package/components/response-layout/index.umd.cjs +1 -1
  123. package/components/response-layout-editor/index.css +1 -1
  124. package/components/response-layout-editor/index.esm.js +1081 -1043
  125. package/components/response-layout-editor/index.umd.cjs +1 -1
  126. package/components/response-toolbar/index.esm.js +753 -738
  127. package/components/response-toolbar/index.umd.cjs +1 -1
  128. package/components/schema-selector/index.css +1 -1
  129. package/components/schema-selector/index.esm.js +4418 -4177
  130. package/components/schema-selector/index.umd.cjs +2 -2
  131. package/components/search-box/index.esm.js +119 -119
  132. package/components/search-box/index.umd.cjs +1 -1
  133. package/components/section/index.esm.js +92 -91
  134. package/components/section/index.umd.cjs +1 -1
  135. package/components/smoke-detector/index.esm.js +59 -59
  136. package/components/smoke-detector/index.umd.cjs +1 -1
  137. package/components/splitter/index.esm.js +103 -103
  138. package/components/splitter/index.umd.cjs +1 -1
  139. package/components/step/index.esm.js +85 -85
  140. package/components/step/index.umd.cjs +1 -1
  141. package/components/switch/index.esm.js +457 -378
  142. package/components/switch/index.umd.cjs +1 -1
  143. package/components/tabs/index.css +1 -1
  144. package/components/tabs/index.esm.js +1696 -1617
  145. package/components/tabs/index.umd.cjs +1 -1
  146. package/components/tags/index.esm.js +53 -53
  147. package/components/tags/index.umd.cjs +1 -1
  148. package/components/text/index.esm.js +268 -268
  149. package/components/text/index.umd.cjs +1 -1
  150. package/components/textarea/index.esm.js +420 -341
  151. package/components/textarea/index.umd.cjs +1 -1
  152. package/components/time-picker/index.css +1 -1
  153. package/components/time-picker/index.esm.js +1062 -981
  154. package/components/time-picker/index.umd.cjs +1 -1
  155. package/components/transfer/index.css +1 -1
  156. package/components/transfer/index.esm.js +381 -379
  157. package/components/transfer/index.umd.cjs +1 -1
  158. package/components/tree-grid/index.css +1 -1
  159. package/components/tree-grid/index.esm.js +5252 -9560
  160. package/components/tree-grid/index.umd.cjs +1 -1
  161. package/components/tree-view/index.css +1 -0
  162. package/components/tree-view/index.esm.js +3920 -2692
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +373 -367
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +92 -92
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +597 -417
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +251 -251
  171. package/components/weather/index.umd.cjs +4 -4
  172. package/farris.all.esm.js +17125 -16176
  173. package/farris.all.umd.cjs +8 -8
  174. package/index.css +1 -1
  175. package/package.json +1 -1
  176. package/types/capsule/src/capsule.props.d.ts +2 -2
  177. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  178. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  179. package/types/common/index.d.ts +1 -0
  180. package/types/common/types.d.ts +1 -1
  181. package/types/common/utils/encrypt.d.ts +2 -0
  182. package/types/component/src/component.props.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +1 -1
  184. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  185. package/types/components.d.ts +1 -0
  186. package/types/data-grid/index.d.ts +5 -2
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  189. package/types/data-view/composition/types.d.ts +18 -1
  190. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  191. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  193. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  194. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  195. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  196. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  197. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  198. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  199. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  200. package/types/dynamic-form/src/types.d.ts +12 -1
  201. package/types/dynamic-resolver/index.d.ts +1 -0
  202. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  203. package/types/dynamic-resolver/src/types.d.ts +9 -0
  204. package/types/dynamic-view/index.d.ts +1 -0
  205. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  206. package/types/index.d.ts +2 -0
  207. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  208. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  209. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  210. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  211. package/types/lookup/src/composition/types.d.ts +8 -0
  212. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  213. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  214. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  215. package/types/lookup/src/composition/use-http.d.ts +9 -5
  216. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  217. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  218. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  219. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  220. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  221. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  222. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  223. package/types/modal/src/modal.component.d.ts +3 -0
  224. package/types/modal/src/modal.props.d.ts +4 -0
  225. package/types/page-header/src/page-header.props.d.ts +1 -0
  226. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  227. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  228. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  229. package/types/response-layout-editor/src/type.d.ts +21 -0
  230. package/types/tabs/src/tabs.props.d.ts +1 -0
  231. package/types/tree-grid/index.d.ts +8 -2
  232. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  233. package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
  234. package/types/modal/src/composition/use-esc.d.ts +0 -1
  235. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  236. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,8 +1,8 @@
1
- var Me = Object.defineProperty;
2
- var Te = (t, e, n) => e in t ? Me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var W = (t, e, n) => Te(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { ref as l, computed as y, createVNode as r, Fragment as ee, createTextVNode as Be, defineComponent as ne, watch as Y, onMounted as ae, onUnmounted as le, Teleport as ke, shallowRef as ze, createApp as Ee, nextTick as Re, render as _, h as Se, cloneVNode as He, mergeProps as oe, reactive as A } from "vue";
5
- const Oe = {
1
+ var ze = Object.defineProperty;
2
+ var Re = (t, e, n) => e in t ? ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var N = (t, e, n) => Re(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { ref as l, computed as y, createVNode as r, Fragment as ne, createTextVNode as Se, defineComponent as oe, watch as X, onMounted as se, onUnmounted as ue, Teleport as He, Transition as Oe, shallowRef as Ie, createApp as je, nextTick as Le, render as te, h as Fe, cloneVNode as De, mergeProps as ie, reactive as W } from "vue";
5
+ const Pe = {
6
6
  width: { Type: Number, default: 400 },
7
7
  type: { Type: String, default: "info" },
8
8
  title: { Type: String, default: "" },
@@ -12,77 +12,77 @@ const Oe = {
12
12
  exceptionInfo: { Type: Object, default: null },
13
13
  promptEditorType: { Type: String, default: "text-area" }
14
14
  };
15
- function te() {
15
+ function ae() {
16
16
  return new DOMException("The request is not allowed", "NotAllowedError");
17
17
  }
18
- async function Ie(t) {
18
+ async function Ve(t) {
19
19
  if (!navigator.clipboard)
20
- throw te();
20
+ throw ae();
21
21
  return navigator.clipboard.writeText(t);
22
22
  }
23
- async function je(t) {
23
+ async function Ne(t) {
24
24
  const e = document.createElement("span");
25
25
  e.textContent = t, e.style.whiteSpace = "pre", e.style.webkitUserSelect = "auto", e.style.userSelect = "all", document.body.appendChild(e);
26
26
  const n = window.getSelection(), a = window.document.createRange();
27
27
  n == null || n.removeAllRanges(), a.selectNode(e), n == null || n.addRange(a);
28
- let f = !1;
28
+ let c = !1;
29
29
  try {
30
- f = window.document.execCommand("copy");
30
+ c = window.document.execCommand("copy");
31
31
  } finally {
32
32
  n == null || n.removeAllRanges(), window.document.body.removeChild(e);
33
33
  }
34
- if (!f) throw te();
34
+ if (!c) throw ae();
35
35
  }
36
- async function Fe(t) {
36
+ async function We(t) {
37
37
  try {
38
- await Ie(t);
38
+ await Ve(t);
39
39
  } catch (e) {
40
40
  try {
41
- await je(t);
41
+ await Ne(t);
42
42
  } catch (n) {
43
- throw n || e || te();
43
+ throw n || e || ae();
44
44
  }
45
45
  }
46
46
  }
47
- function Le() {
47
+ function Ae() {
48
48
  async function t(e) {
49
- await Fe(e);
49
+ await We(e);
50
50
  }
51
51
  return { onCopy: t };
52
52
  }
53
- function De(t, e, n, a) {
54
- const f = l(14), s = l(140), h = l(""), u = l(a.value.length), d = y(() => a.value), i = y(() => ({
55
- "font-size": `${f.value}px`,
53
+ function $e(t, e, n, a) {
54
+ const c = l(14), d = l(140), h = l(""), s = l(a.value.length), v = y(() => a.value), u = y(() => ({
55
+ "font-size": `${c.value}px`,
56
56
  height: "100%"
57
57
  }));
58
- function g(T) {
59
- if (T.currentTarget) {
60
- const B = T.currentTarget.value || "";
61
- u.value = B.length;
58
+ function w(g) {
59
+ if (g.currentTarget) {
60
+ const B = g.currentTarget.value || "";
61
+ s.value = B.length;
62
62
  }
63
63
  }
64
- return () => r(ee, null, [r("textarea", {
64
+ return () => r(ne, null, [r("textarea", {
65
65
  title: "promptMessage",
66
66
  name: "promptMessage",
67
67
  class: "form-control",
68
- style: i.value,
68
+ style: u.value,
69
69
  rows: "4",
70
- maxlength: s.value,
71
- onInput: (T) => g(T)
72
- }, [d.value]), r("span", {
70
+ maxlength: d.value,
71
+ onInput: (g) => w(g)
72
+ }, [v.value]), r("span", {
73
73
  class: "textarea-wordcount",
74
74
  title: h.value,
75
75
  style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
76
- }, [u.value + " / " + s.value])]);
76
+ }, [s.value + " / " + d.value])]);
77
77
  }
78
- function Pe(t, e, n, a) {
79
- const f = De(t, e, n, a), s = /* @__PURE__ */ new Map([["text-area", f]]);
80
- function h(u) {
81
- return s.get(u) || null;
78
+ function Xe(t, e, n, a) {
79
+ const c = $e(t, e, n, a), d = /* @__PURE__ */ new Map([["text-area", c]]);
80
+ function h(s) {
81
+ return d.get(s) || null;
82
82
  }
83
83
  return { getEditorRender: h };
84
84
  }
85
- function Ve() {
85
+ function Ye() {
86
86
  const t = l(!1), e = l("复制成功");
87
87
  return {
88
88
  feedbackStyle: y(() => {
@@ -108,176 +108,176 @@ function Ve() {
108
108
  toShowFeedback: t
109
109
  };
110
110
  }
111
- function Ne(t, e) {
111
+ function Ue(t, e) {
112
112
  const n = e.getEditorRender(t.promptEditorType);
113
113
  return () => n && n();
114
114
  }
115
- function We(t) {
116
- const e = l(3), n = l(480), a = y(() => !!t.value && !!t.value.date), f = y(() => `发生时间 : ${t.value && t.value.date || ""}`), s = y(() => !!t.value && !!t.value.detail), h = y(() => {
117
- const x = `${n.value}px`;
115
+ function qe(t) {
116
+ const e = l(3), n = l(480), a = y(() => !!t.value && !!t.value.date), c = y(() => `发生时间 : ${t.value && t.value.date || ""}`), d = y(() => !!t.value && !!t.value.detail), h = y(() => {
117
+ const C = `${n.value}px`;
118
118
  return {
119
119
  overflow: "hidden",
120
120
  "text-overflow": "ellipsis",
121
121
  display: "-webkit-box",
122
122
  "-webkit-box-orient": "vertical",
123
123
  "-webkit-line-clamp": e.value,
124
- "max-height": x
124
+ "max-height": C
125
125
  };
126
- }), u = y(() => t.value && t.value.detail || ""), d = y(() => !0), i = l(!1), g = l("展开"), T = l("收起"), B = y(() => {
127
- const x = {
126
+ }), s = y(() => t.value && t.value.detail || ""), v = y(() => !0), u = l(!1), w = l("展开"), g = l("收起"), B = y(() => {
127
+ const C = {
128
128
  display: "block",
129
129
  color: "#2A87FF"
130
130
  };
131
- return x["text-align"] = i.value ? "" : "right", x;
131
+ return C["text-align"] = u.value ? "" : "right", C;
132
132
  });
133
- function z(x, p) {
134
- i.value = !i.value, e.value = i.value ? 20 : 3;
133
+ function E(C, p) {
134
+ u.value = !u.value, e.value = u.value ? 20 : 3;
135
135
  }
136
- function S(x) {
137
- return z();
136
+ function z(C) {
137
+ return E();
138
138
  }
139
- function O(x) {
140
- return z();
139
+ function O(C) {
140
+ return E();
141
141
  }
142
142
  return () => r("div", {
143
143
  class: "toast-msg-detail"
144
- }, [a.value && r("div", null, [f.value]), s.value && r("div", {
144
+ }, [a.value && r("div", null, [c.value]), d.value && r("div", {
145
145
  id: "exception_error_msg",
146
146
  ref: "exceptionMessageRef",
147
147
  style: h.value
148
- }, [Be("详细信息 : "), r("span", {
149
- innerHTML: u.value
150
- }, null)]), d.value && r("span", {
148
+ }, [Se("详细信息 : "), r("span", {
149
+ innerHTML: s.value
150
+ }, null)]), v.value && r("span", {
151
151
  style: B.value
152
- }, [i.value && r("span", {
153
- onClick: S,
152
+ }, [u.value && r("span", {
153
+ onClick: z,
154
154
  style: "cursor: pointer;"
155
- }, [T.value]), !i.value && r("span", {
155
+ }, [g.value]), !u.value && r("span", {
156
156
  onClick: O,
157
157
  style: "cursor: pointer;"
158
- }, [g.value])])]);
158
+ }, [w.value])])]);
159
159
  }
160
- function Ae(t) {
160
+ function Je(t) {
161
161
  return () => r("p", {
162
162
  class: "toast-msg-detail",
163
163
  innerHTML: t.value
164
164
  }, null);
165
165
  }
166
- function $e(t, e, n, a) {
167
- const f = l(t.exceptionInfo), s = y(() => {
166
+ function Ke(t, e, n, a) {
167
+ const c = l(t.exceptionInfo), d = y(() => {
168
168
  const B = {
169
169
  "f-icon": !0
170
- }, z = `f-icon-${e.value}`;
171
- return B[z] = !0, B;
172
- }), h = y(() => n.value || f.value && f.value.message), u = y(() => a.value), d = y(() => !!a.value), i = y(() => !!f.value);
173
- function g() {
174
- return i.value ? We(f) : d.value ? Ae(u) : () => null;
175
- }
176
- const T = g();
177
- return () => r(ee, null, [r("div", {
170
+ }, E = `f-icon-${e.value}`;
171
+ return B[E] = !0, B;
172
+ }), h = y(() => n.value || c.value && c.value.message), s = y(() => a.value), v = y(() => !!a.value), u = y(() => !!c.value);
173
+ function w() {
174
+ return u.value ? qe(c) : v.value ? Je(s) : () => null;
175
+ }
176
+ const g = w();
177
+ return () => r(ne, null, [r("div", {
178
178
  class: "float-left modal-tips-iconwrap"
179
179
  }, [r("span", {
180
- class: s.value
180
+ class: d.value
181
181
  }, null)]), r("div", {
182
182
  class: "modal-tips-content"
183
183
  }, [r("p", {
184
184
  class: "toast-msg-title",
185
185
  innerHTML: h.value
186
- }, null), T()])]);
186
+ }, null), g()])]);
187
187
  }
188
- function Xe(t, e, n) {
188
+ function Ge(t, e, n) {
189
189
  const {
190
190
  onCopy: a
191
191
  } = e, {
192
- toShowFeedback: f
193
- } = n, s = l("复制成功"), h = l("复制详细信息"), u = l(t.exceptionInfo || {
192
+ toShowFeedback: c
193
+ } = n, d = l("复制成功"), h = l("复制详细信息"), s = l(t.exceptionInfo || {
194
194
  date: "",
195
195
  message: "",
196
196
  detail: ""
197
- }), d = y(() => u.value && u.value.detail || "");
198
- function i(g) {
199
- a(d.value).catch((T) => {
200
- s.value = "复制失败";
197
+ }), v = y(() => s.value && s.value.detail || "");
198
+ function u(w) {
199
+ a(v.value).catch((g) => {
200
+ d.value = "复制失败";
201
201
  }).finally(() => {
202
- f.value = !0, setTimeout(() => {
203
- f.value = !1;
202
+ c.value = !0, setTimeout(() => {
203
+ c.value = !1;
204
204
  }, 700);
205
205
  });
206
206
  }
207
207
  return () => r("span", {
208
208
  style: "width: 100%;color: #2A87FF;padding-left: 37px;"
209
209
  }, [r("span", {
210
- onClick: i,
210
+ onClick: u,
211
211
  style: "cursor: pointer;"
212
212
  }, [h.value])]);
213
213
  }
214
- function Ye(t, e, n, a) {
215
- const f = l(t.type), s = l([]), h = l(t.exceptionInfo), u = l(t.okButtonText), d = l(t.cancelButtonText), i = l(!0), g = l(!0), T = y(() => !!(s.value && s.value.length)), B = y(() => h.value && h.value.date && h.value.message && h.value.detail), z = y(() => !(s.value && s.value.length) && (u.value || d.value)), S = y(() => g.value && u.value), O = y(() => i.value && d.value), x = Xe(t, n, a);
216
- function p(E) {
217
- f.value === "question" && e.emit("reject"), e.emit("close");
214
+ function Qe(t, e, n, a) {
215
+ const c = l(t.type), d = l([]), h = l(t.exceptionInfo), s = l(t.okButtonText), v = l(t.cancelButtonText), u = l(!0), w = l(!0), g = y(() => !!(d.value && d.value.length)), B = y(() => h.value && h.value.date && h.value.message && h.value.detail), E = y(() => !(d.value && d.value.length) && (s.value || v.value)), z = y(() => w.value && s.value), O = y(() => u.value && v.value), C = Ge(t, n, a);
216
+ function p(S) {
217
+ c.value === "question" && e.emit("reject"), e.emit("close");
218
218
  }
219
- function k(E) {
220
- f.value === "question" && e.emit("accept"), e.emit("close");
219
+ function T(S) {
220
+ c.value === "question" && e.emit("accept"), e.emit("close");
221
221
  }
222
222
  return () => r("div", {
223
223
  class: "modal-footer"
224
- }, [B.value && x(), z.value && O.value && r("button", {
224
+ }, [B.value && C(), E.value && O.value && r("button", {
225
225
  type: "button",
226
226
  class: "btn btn-secondary btn-lg",
227
227
  onClick: p
228
- }, [d.value]), z.value && S.value && r("button", {
228
+ }, [v.value]), E.value && z.value && r("button", {
229
229
  type: "button",
230
230
  class: "btn btn-primary btn-lg",
231
- onClick: k
232
- }, [u.value]), T.value && s.value.length && s.value.map((E) => r("button", {
231
+ onClick: T
232
+ }, [s.value]), g.value && d.value.length && d.value.map((S) => r("button", {
233
233
  type: "button",
234
- onClick: E.handle,
235
- class: E.class
236
- }, [E.iconClass && r("span", {
237
- class: E.iconClass
238
- }, null), E.text]))]);
234
+ onClick: S.handle,
235
+ class: S.class
236
+ }, [S.iconClass && r("span", {
237
+ class: S.iconClass
238
+ }, null), S.text]))]);
239
239
  }
240
- const J = /* @__PURE__ */ ne({
240
+ const J = /* @__PURE__ */ oe({
241
241
  name: "FMessageBox",
242
- props: Oe,
242
+ props: Pe,
243
243
  emits: ["accept", "reject", "close"],
244
244
  setup(t, e) {
245
- const n = l(t.type), a = l(t.title), f = l(t.detail), s = y(() => {
246
- const x = {
245
+ const n = l(t.type), a = l(t.title), c = l(t.detail), d = y(() => {
246
+ const C = {
247
247
  "modal-tips": !0,
248
248
  "d-flex": !0,
249
249
  "flex-row": !0
250
250
  }, p = `messager-type-${n.value}`;
251
- return x[p] = !0, x;
251
+ return C[p] = !0, C;
252
252
  }), h = y(() => {
253
- const x = {};
254
- return n.value === "prompt" ? x.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (x.padding = "0.5rem 1.5rem 1rem 1.5rem"), x;
255
- }), u = Le(), d = Pe(t, n, a, f), i = Ve(), {
256
- feedbackStyle: g,
257
- feedbackMessage: T
258
- } = i;
253
+ const C = {};
254
+ return n.value === "prompt" ? C.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (C.padding = "0.5rem 1.5rem 1rem 1.5rem"), C;
255
+ }), s = Ae(), v = Xe(t, n, a, c), u = Ye(), {
256
+ feedbackStyle: w,
257
+ feedbackMessage: g
258
+ } = u;
259
259
  function B() {
260
260
  return r("div", {
261
- style: g.value
262
- }, [T.value]);
261
+ style: w.value
262
+ }, [g.value]);
263
263
  }
264
- function z() {
264
+ function E() {
265
265
  switch (n.value) {
266
266
  case "prompt":
267
- return Ne(t, d);
267
+ return Ue(t, v);
268
268
  default:
269
- return $e(t, n, a, f);
269
+ return Ke(t, n, a, c);
270
270
  }
271
271
  }
272
- const S = z(), O = Ye(t, e, u, i);
272
+ const z = E(), O = Qe(t, e, s, u);
273
273
  return () => r("div", {
274
274
  class: "farris-messager"
275
275
  }, [r("section", {
276
- class: s.value,
276
+ class: d.value,
277
277
  style: h.value
278
- }, [S()]), O(), B()]);
278
+ }, [z()]), O(), B()]);
279
279
  }
280
- }), Ue = {
280
+ }), Ze = {
281
281
  /**
282
282
  * 自定义类
283
283
  */
@@ -335,7 +335,8 @@ const J = /* @__PURE__ */ ne({
335
335
  render: { type: Function, default: null },
336
336
  acceptCallback: { type: Function, default: null },
337
337
  rejectCallback: { type: Function, default: null },
338
- enableEsc: { type: Boolean, default: !0 }
338
+ enableEsc: { type: Boolean, default: !0 },
339
+ enableEnter: { type: Boolean, default: !1 }
339
340
  };
340
341
  class R {
341
342
  constructor(e, n) {
@@ -344,8 +345,8 @@ class R {
344
345
  static getTransformInfo(e) {
345
346
  const a = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
346
347
  if (a.length >= 6) {
347
- const f = parseInt(a[4], 10), s = parseInt(a[5], 10);
348
- return { x: f, y: s };
348
+ const c = parseInt(a[4], 10), d = parseInt(a[5], 10);
349
+ return { x: c, y: d };
349
350
  }
350
351
  return { x: 0, y: 0 };
351
352
  }
@@ -369,8 +370,8 @@ class R {
369
370
  if (window) {
370
371
  const a = window.getComputedStyle(e);
371
372
  if (a) {
372
- const f = parseInt(a.getPropertyValue("left"), 10), s = parseInt(a.getPropertyValue("top"), 10);
373
- n.x = isNaN(f) ? 0 : f, n.y = isNaN(s) ? 0 : s;
373
+ const c = parseInt(a.getPropertyValue("left"), 10), d = parseInt(a.getPropertyValue("top"), 10);
374
+ n.x = isNaN(c) ? 0 : c, n.y = isNaN(d) ? 0 : d;
374
375
  }
375
376
  return n;
376
377
  }
@@ -401,12 +402,12 @@ class R {
401
402
  return this.x = e.x, this.y = e.y, this;
402
403
  }
403
404
  }
404
- class $ {
405
+ class A {
405
406
  constructor(e, n) {
406
407
  this.width = e, this.height = n;
407
408
  }
408
409
  static getCurrent(e) {
409
- const n = new $(0, 0);
410
+ const n = new A(0, 0);
410
411
  if (window) {
411
412
  const a = window.getComputedStyle(e);
412
413
  return a && (n.width = parseInt(a.getPropertyValue("width"), 10), n.height = parseInt(a.getPropertyValue("height"), 10)), n;
@@ -414,183 +415,183 @@ class $ {
414
415
  return null;
415
416
  }
416
417
  static copy(e) {
417
- return new $(0, 0).set(e);
418
+ return new A(0, 0).set(e);
418
419
  }
419
420
  set(e) {
420
421
  return this.width = e.width, this.height = e.height, this;
421
422
  }
422
423
  }
423
- function qe(t, e) {
424
- const n = l(), a = l(), f = l(), s = l(), h = l(), u = l(), d = l(), i = l(), g = l(), T = l(), B = l(), z = l(), S = l(t.draggable), O = l(!1);
425
- function x() {
426
- const c = a.value || document.body, v = window.getComputedStyle(c);
427
- if (!v || !n.value)
424
+ function _e(t, e) {
425
+ const n = l(), a = l(), c = l(), d = l(), h = l(), s = l(), v = l(), u = l(), w = l(), g = l(), B = l(), E = l(), z = l(t.draggable), O = l(!1);
426
+ function C() {
427
+ const i = a.value || document.body, f = window.getComputedStyle(i);
428
+ if (!f || !n.value)
428
429
  return;
429
- const C = R.getTransformInfo(n.value), b = {};
430
- d.value && (b.deltaL = n.value.offsetLeft - d.value.x, b.deltaT = n.value.offsetTop - d.value.y);
431
- const H = v.getPropertyValue("position");
432
- b.width = c.clientWidth, b.height = c.clientHeight, b.pr = parseInt(v.getPropertyValue("padding-right"), 10), b.pb = parseInt(v.getPropertyValue("padding-bottom"), 10), b.position = v.getPropertyValue("position"), H === "static" && (c.style.position = "relative"), b.translateX = C.x, b.translateY = C.y, T.value = b;
430
+ const M = R.getTransformInfo(n.value), b = {};
431
+ v.value && (b.deltaL = n.value.offsetLeft - v.value.x, b.deltaT = n.value.offsetTop - v.value.y);
432
+ const H = f.getPropertyValue("position");
433
+ b.width = i.clientWidth, b.height = i.clientHeight, b.pr = parseInt(f.getPropertyValue("padding-right"), 10), b.pb = parseInt(f.getPropertyValue("padding-bottom"), 10), b.position = f.getPropertyValue("position"), H === "static" && (i.style.position = "relative"), b.translateX = M.x, b.translateY = M.y, g.value = b;
433
434
  }
434
- function p(c) {
435
+ function p(i) {
435
436
  if (n.value) {
436
- s.value = $.getCurrent(n.value), h.value = R.getCurrent(n.value), u.value = s.value ? $.copy(s.value) : null, d.value = h.value ? R.copy(h.value) : null, x();
437
- const v = c.target.getAttribute("type") || "";
438
- i.value = {
439
- n: !!v.match(/n/),
440
- s: !!v.match(/s/),
441
- w: !!v.match(/w/),
442
- e: !!v.match(/e/)
437
+ d.value = A.getCurrent(n.value), h.value = R.getCurrent(n.value), s.value = d.value ? A.copy(d.value) : null, v.value = h.value ? R.copy(h.value) : null, C();
438
+ const f = i.target.getAttribute("type") || "";
439
+ u.value = {
440
+ n: !!f.match(/n/),
441
+ s: !!f.match(/s/),
442
+ w: !!f.match(/w/),
443
+ e: !!f.match(/e/)
443
444
  };
444
445
  }
445
446
  }
446
- function k() {
447
- var c, v, C, b;
447
+ function T() {
448
+ var i, f, M, b;
448
449
  if (n.value) {
449
450
  const H = n.value;
450
- i.value && ((i.value.n || i.value.s) && ((c = u.value) != null && c.height) && (H.style.height = u.value.height + "px"), (i.value.w || i.value.e) && ((v = u.value) != null && v.width) && (H.style.width = u.value.width + "px"), d.value && ((C = d.value) != null && C.x && (H.style.left = d.value.x + "px"), (b = d.value) != null && b.y && (H.style.top = d.value.y + "px")));
451
+ u.value && ((u.value.n || u.value.s) && ((i = s.value) != null && i.height) && (H.style.height = s.value.height + "px"), (u.value.w || u.value.e) && ((f = s.value) != null && f.width) && (H.style.width = s.value.width + "px"), v.value && ((M = v.value) != null && M.x && (H.style.left = v.value.x + "px"), (b = v.value) != null && b.y && (H.style.top = v.value.y + "px")));
451
452
  }
452
453
  }
453
- function E() {
454
- const c = t.minHeight ? t.minHeight : 1, v = t.minWidth ? t.minWidth : 1;
455
- u.value && d.value && i.value && s.value && (u.value.height < c && (u.value.height = c, i.value.n && h.value && (d.value.y = h.value.y + (s.value.height - c))), u.value.width < v && (u.value.width = v, i.value.w && h.value && (d.value.x = h.value.x + (s.value.width - v))), t.maxHeight && u.value.height > t.maxHeight && (u.value.height = t.maxHeight, h.value && i.value.n && (d.value.y = h.value.y + (s.value.height - t.maxHeight))), t.maxWidth && u.value.width > t.maxWidth && (u.value.width = t.maxWidth, i.value.w && h.value && (d.value.x = h.value.x + (s.value.width - t.maxWidth))));
454
+ function S() {
455
+ const i = t.minHeight ? t.minHeight : 1, f = t.minWidth ? t.minWidth : 1;
456
+ s.value && v.value && u.value && d.value && (s.value.height < i && (s.value.height = i, u.value.n && h.value && (v.value.y = h.value.y + (d.value.height - i))), s.value.width < f && (s.value.width = f, u.value.w && h.value && (v.value.x = h.value.x + (d.value.width - f))), t.maxHeight && s.value.height > t.maxHeight && (s.value.height = t.maxHeight, h.value && u.value.n && (v.value.y = h.value.y + (d.value.height - t.maxHeight))), t.maxWidth && s.value.width > t.maxWidth && (s.value.width = t.maxWidth, u.value.w && h.value && (v.value.x = h.value.x + (d.value.width - t.maxWidth))));
456
457
  }
457
- function V() {
458
+ function F() {
458
459
  if (a.value) {
459
- const c = T.value;
460
- if (d.value && u.value && i.value && s.value) {
461
- const v = c.width - c.pr - c.deltaL - c.translateX - d.value.x, C = c.height - c.pb - c.deltaT - c.translateY - d.value.y;
462
- i.value.n && d.value.y + c.translateY < 0 && h.value && (d.value.y = -c.translateY, u.value.height = s.value.height + h.value.y + c.translateY), i.value.w && d.value.x + c.translateX < 0 && h.value && (d.value.x = -c.translateX, u.value.width = s.value.width + h.value.x + c.translateX), u.value.width > v && (u.value.width = v), u.value.height > C && (u.value.height = C);
460
+ const i = g.value;
461
+ if (v.value && s.value && u.value && d.value) {
462
+ const f = i.width - i.pr - i.deltaL - i.translateX - v.value.x, M = i.height - i.pb - i.deltaT - i.translateY - v.value.y;
463
+ u.value.n && v.value.y + i.translateY < 0 && h.value && (v.value.y = -i.translateY, s.value.height = d.value.height + h.value.y + i.translateY), u.value.w && v.value.x + i.translateX < 0 && h.value && (v.value.x = -i.translateX, s.value.width = d.value.width + h.value.x + i.translateX), s.value.width > f && (s.value.width = f), s.value.height > M && (s.value.height = M);
463
464
  }
464
465
  }
465
466
  }
466
- function D(c) {
467
- if (!f.value || !s.value || !h.value || !i.value)
467
+ function D(i) {
468
+ if (!c.value || !d.value || !h.value || !u.value)
468
469
  return;
469
- c.subtract(f.value);
470
- const v = c.x, C = c.y;
471
- i.value.n ? (d.value.y = h.value.y + C, u.value.height = s.value.height - C) : i.value.s && (u.value.height = s.value.height + C), i.value.e ? u.value.width = s.value.width + v : i.value.w && (u.value.width = s.value.width - v, d.value.x = h.value.x + v), V(), E(), k();
470
+ i.subtract(c.value);
471
+ const f = i.x, M = i.y;
472
+ u.value.n ? (v.value.y = h.value.y + M, s.value.height = d.value.height - M) : u.value.s && (s.value.height = d.value.height + M), u.value.e ? s.value.width = d.value.width + f : u.value.w && (s.value.width = d.value.width - f, v.value.x = h.value.x + f), F(), S(), T();
472
473
  }
473
- function m(c) {
474
- if (!g.value)
474
+ function $(i) {
475
+ if (!w.value)
475
476
  return;
476
- const v = R.fromEvent(c);
477
- v && D(v);
477
+ const f = R.fromEvent(i);
478
+ f && D(f);
478
479
  }
479
- function w() {
480
+ function m() {
480
481
  if (n.value) {
481
482
  const {
482
- width: c,
483
- height: v,
484
- x: C,
483
+ width: i,
484
+ height: f,
485
+ x: M,
485
486
  y: b
486
487
  } = n.value.getBoundingClientRect(), H = R.getTransformInfo(n.value);
487
488
  return {
488
489
  size: {
489
- width: c,
490
- height: v
490
+ width: i,
491
+ height: f
491
492
  },
492
493
  position: {
493
- x: C - H.x,
494
+ x: M - H.x,
494
495
  y: b - H.y
495
496
  }
496
497
  };
497
498
  }
498
499
  return null;
499
500
  }
500
- function I(c) {
501
+ function x(i) {
501
502
  if (n.value) {
502
- const v = w();
503
- B.value = v;
503
+ const f = m();
504
+ B.value = f;
504
505
  }
505
- f.value = void 0, s.value = null, h.value = null, u.value = null, d.value = null, i.value = null, g.value = null, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", I);
506
+ c.value = void 0, d.value = null, h.value = null, s.value = null, v.value = null, u.value = null, w.value = null, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", x);
506
507
  }
507
- function F() {
508
- document.addEventListener("mousemove", m), document.addEventListener("mouseup", I);
508
+ function j() {
509
+ document.addEventListener("mousemove", $), document.addEventListener("mouseup", x);
509
510
  }
510
- function j(c) {
511
- c instanceof MouseEvent && c.button === 2 || S.value && (c.stopPropagation(), c.preventDefault(), f.value = R.fromEvent(c), g.value = c.target, p(c), F());
511
+ function I(i) {
512
+ i instanceof MouseEvent && i.button === 2 || z.value && (i.stopPropagation(), i.preventDefault(), c.value = R.fromEvent(i), w.value = i.target, p(i), j());
512
513
  }
513
- function L(c) {
514
- return n.value = c, r(ee, null, [r("div", {
515
- class: "ng-resizable-handle ng-resizable-n",
514
+ function L(i) {
515
+ return n.value = i, r(ne, null, [r("div", {
516
+ class: "fv-resizable-handle fv-resizable-n",
516
517
  type: "n",
517
- onMousedown: (v) => j(v)
518
+ onMousedown: (f) => I(f)
518
519
  }, null), r("div", {
519
- class: "ng-resizable-handle ng-resizable-e",
520
+ class: "fv-resizable-handle fv-resizable-e",
520
521
  type: "e",
521
- onMousedown: (v) => j(v)
522
+ onMousedown: (f) => I(f)
522
523
  }, null), r("div", {
523
- class: "ng-resizable-handle ng-resizable-s",
524
+ class: "fv-resizable-handle fv-resizable-s",
524
525
  type: "s",
525
- onMousedown: (v) => j(v)
526
+ onMousedown: (f) => I(f)
526
527
  }, null), r("div", {
527
- class: "ng-resizable-handle ng-resizable-w",
528
+ class: "fv-resizable-handle fv-resizable-w",
528
529
  type: "w",
529
- onMousedown: (v) => j(v)
530
+ onMousedown: (f) => I(f)
530
531
  }, null), r("div", {
531
- class: "ng-resizable-handle ng-resizable-ne",
532
+ class: "fv-resizable-handle fv-resizable-ne",
532
533
  type: "ne",
533
- onMousedown: (v) => j(v)
534
+ onMousedown: (f) => I(f)
534
535
  }, null), r("div", {
535
- class: "ng-resizable-handle ng-resizable-se ng-resizable-diagonal",
536
+ class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
536
537
  type: "se",
537
- onMousedown: (v) => j(v)
538
+ onMousedown: (f) => I(f)
538
539
  }, null), r("div", {
539
- class: "ng-resizable-handle ng-resizable-sw",
540
+ class: "fv-resizable-handle fv-resizable-sw",
540
541
  type: "sw",
541
- onMousedown: (v) => j(v)
542
+ onMousedown: (f) => I(f)
542
543
  }, null), r("div", {
543
- class: "ng-resizable-handle ng-resizable-nw",
544
+ class: "fv-resizable-handle fv-resizable-nw",
544
545
  type: "nw",
545
- onMousedown: (v) => j(v)
546
+ onMousedown: (f) => I(f)
546
547
  }, null)]);
547
548
  }
548
- function N(c = !0) {
549
- const v = a.value || document.body, C = $.getCurrent(v), b = n.value;
550
- c && (z.value = w(), z.value.transform = b.style.transform), C && b && (u.value = C, b.style.height = u.value.height - 14 + "px", b.style.width = u.value.width - 14 + "px", b.style.left = "7px", b.style.top = "7px", b.style.transform = "", B.value = {
551
- size: u.value,
549
+ function V(i = !0) {
550
+ const f = a.value || document.body, M = A.getCurrent(f), b = n.value;
551
+ i && (E.value = m(), E.value.transform = b.style.transform), M && b && (s.value = M, b.style.height = s.value.height - 14 + "px", b.style.width = s.value.width - 14 + "px", b.style.left = "7px", b.style.top = "7px", b.style.transform = "", B.value = {
552
+ size: s.value,
552
553
  position: {
553
554
  x: 0,
554
555
  y: 0
555
556
  }
556
- }, S.value = !1, O.value = !0);
557
+ }, z.value = !1, O.value = !0);
557
558
  }
558
559
  function K() {
559
- var c, v;
560
- if (z.value) {
561
- const C = {
562
- width: z.value.size.width || 0,
563
- height: z.value.size.height || 0
560
+ var i, f;
561
+ if (E.value) {
562
+ const M = {
563
+ width: E.value.size.width || 0,
564
+ height: E.value.size.height || 0
564
565
  }, b = {
565
- x: (window.innerWidth - C.width) / 2,
566
- y: (window.innerHeight - C.height) / 2
566
+ x: (window.innerWidth - M.width) / 2,
567
+ y: (window.innerHeight - M.height) / 2
567
568
  };
568
- (c = u.value) == null || c.set(C), (v = d.value) == null || v.set(b);
569
+ (i = s.value) == null || i.set(M), (f = v.value) == null || f.set(b);
569
570
  const H = n.value;
570
- H.style.height = C.height + "px", H.style.width = C.width + "px", H.style.left = `${b.x}px`, H.style.top = `${b.y}px`, H.style.transform = "", B.value = {
571
- size: C,
571
+ H.style.height = M.height + "px", H.style.width = M.width + "px", H.style.left = `${b.x}px`, H.style.top = `${b.y}px`, H.style.transform = "", B.value = {
572
+ size: M,
572
573
  position: b
573
- }, S.value = t.draggable, O.value = !1;
574
+ }, z.value = t.draggable, O.value = !1;
574
575
  }
575
576
  }
576
577
  function G() {
577
578
  if (n.value) {
578
- const c = $.getCurrent(n.value);
579
- if (c) {
579
+ const i = A.getCurrent(n.value);
580
+ if (i) {
580
581
  const {
581
- width: v,
582
- height: C
583
- } = c;
584
- n.value.style.left = `${(window.innerWidth - v) / 2}px`, n.value.style.top = `${(window.innerHeight - C) / 2}px`, n.value.style.transform = "";
582
+ width: f,
583
+ height: M
584
+ } = i;
585
+ n.value.style.left = `${(window.innerWidth - f) / 2}px`, n.value.style.top = `${(window.innerHeight - M) / 2}px`, n.value.style.transform = "";
585
586
  }
586
587
  }
587
588
  }
588
589
  function Q() {
589
- const c = () => {
590
- O.value ? N(!1) : G();
590
+ const i = () => {
591
+ O.value ? V(!1) : G();
591
592
  };
592
- return window.addEventListener("resize", c), () => {
593
- window.removeEventListener("resize", c);
593
+ return window.addEventListener("resize", i), () => {
594
+ window.removeEventListener("resize", i);
594
595
  };
595
596
  }
596
597
  const U = Q();
@@ -598,109 +599,134 @@ function qe(t, e) {
598
599
  renderResizeBar: L,
599
600
  boundingElement: a,
600
601
  resizedEventParam: B,
601
- maximize: N,
602
+ maximize: V,
602
603
  restore: K,
603
- allowDrag: S,
604
+ allowDrag: z,
604
605
  isMaximized: O,
605
606
  unWindowResizeHandle: U
606
607
  };
607
608
  }
608
- function Je(t, e) {
609
- const n = l(), a = l(t.draggable), f = l(t.lockAxis), s = l(), h = l(), u = l(!1), d = l(new R(0, 0)), i = l(new R(0, 0)), g = l(new R(0, 0)), T = l(new R(0, 0));
610
- function B(m, w) {
611
- if (w.tagName === "BUTTON")
609
+ function et(t, e, n) {
610
+ const a = l(), c = l(t.draggable), d = l(t.lockAxis), h = l(), s = l(), v = l(!1), u = l(new R(0, 0)), w = l(new R(0, 0)), g = l(new R(0, 0)), B = l(new R(0, 0));
611
+ X(() => n.value, (m) => {
612
+ h.value.style.cursor = m ? "move" : "default";
613
+ });
614
+ function E(m, x) {
615
+ if (x.tagName === "BUTTON")
612
616
  return !1;
613
- if (w === m)
617
+ if (x === m)
614
618
  return !0;
615
- for (const I in w.children)
616
- if (w.children.hasOwnProperty(I) && B(m, w.children[I]))
619
+ for (const j in x.children)
620
+ if (x.children.hasOwnProperty(j) && E(m, x.children[j]))
617
621
  return !0;
618
622
  return !1;
619
623
  }
620
624
  function z() {
621
- var F, j;
622
- let m = g.value.x + i.value.x, w = g.value.y + i.value.y;
623
- f.value === "x" ? (m = ((F = d.value) == null ? void 0 : F.x) || 0, g.value.x = 0) : f.value === "y" && (w = ((j = d.value) == null ? void 0 : j.y) || 0, g.value.y = 0);
624
- const I = `translate3d(${Math.round(m)}px, ${Math.round(w)}px, 0px)`;
625
- n.value && (n.value.style.transform = I), T.value.x = m, T.value.y = w;
626
- }
627
- function S() {
628
- if (!h.value || !n.value)
625
+ var I, L;
626
+ let m = g.value.x + w.value.x, x = g.value.y + w.value.y;
627
+ d.value === "x" ? (m = ((I = u.value) == null ? void 0 : I.x) || 0, g.value.x = 0) : d.value === "y" && (x = ((L = u.value) == null ? void 0 : L.y) || 0, g.value.y = 0);
628
+ const j = `translate3d(${Math.round(m)}px, ${Math.round(x)}px, 0px)`;
629
+ a.value && (a.value.style.transform = j), B.value.x = m, B.value.y = x;
630
+ }
631
+ function O() {
632
+ if (!s.value || !a.value)
629
633
  return null;
630
- const m = h.value.getBoundingClientRect(), w = n.value.getBoundingClientRect(), I = {
631
- top: m.top < w.top,
632
- right: m.right > w.right,
633
- bottom: m.bottom > w.bottom,
634
- left: m.left < w.left
634
+ const m = s.value.getBoundingClientRect(), x = a.value.getBoundingClientRect(), j = {
635
+ top: m.top < x.top,
636
+ right: m.right > x.right,
637
+ bottom: m.bottom > x.bottom,
638
+ left: m.left < x.left
635
639
  };
636
- return I.top || (g.value.y -= w.top - m.top), I.bottom || (g.value.y -= w.bottom - m.bottom), I.right || (g.value.x -= w.right - m.right), I.left || (g.value.x -= w.left - m.left), z(), I;
640
+ return j.top || (g.value.y -= x.top - m.top), j.bottom || (g.value.y -= x.bottom - m.bottom), j.right || (g.value.x -= x.right - m.right), j.left || (g.value.x -= x.left - m.left), z(), j;
637
641
  }
638
- function O(m) {
639
- m && (d.value && m.subtract(d.value), g.value.set(m), z(), S());
642
+ function C(m) {
643
+ m && (u.value && m.subtract(u.value), g.value.set(m), z(), O());
640
644
  }
641
- function x(m) {
642
- u.value && a.value && (m.stopPropagation(), m.preventDefault(), O(R.fromEvent(m, s.value)));
645
+ function p(m) {
646
+ v.value && c.value && (m.stopPropagation(), m.preventDefault(), C(R.fromEvent(m, h.value)));
643
647
  }
644
- function p() {
648
+ function T() {
645
649
  var m;
646
- u.value && (u.value = !1, i.value.add(g.value), g.value.reset(), (m = n.value) == null || m.classList.remove("ng-dragging"), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", p));
650
+ v.value && (v.value = !1, w.value.add(g.value), g.value.reset(), (m = a.value) == null || m.classList.remove("ng-dragging"), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", T));
647
651
  }
648
- function k() {
649
- !u.value && s.value && (u.value = !0, s.value.classList.add("ng-dragging"), document.addEventListener("mousemove", x), document.addEventListener("mouseup", p));
652
+ function S() {
653
+ !v.value && h.value && (v.value = !0, h.value.classList.add("ng-dragging"), document.addEventListener("mousemove", p), document.addEventListener("mouseup", T));
650
654
  }
651
- function E() {
652
- if (n.value) {
653
- const m = R.getTransformInfo(n.value);
654
- i.value.set(m);
655
+ function F() {
656
+ if (a.value) {
657
+ const m = R.getTransformInfo(a.value);
658
+ w.value.set(m);
655
659
  return;
656
660
  }
657
- i.value.reset();
661
+ w.value.reset();
658
662
  }
659
- function V(m) {
660
- if (m instanceof MouseEvent && m.button === 2)
663
+ function D(m) {
664
+ if (!n.value || m instanceof MouseEvent && m.button === 2)
661
665
  return;
662
- const w = m.target || m.srcElement;
663
- s.value !== void 0 && w && !B(w, s.value) || a.value !== !1 && (m.stopPropagation(), m.preventDefault(), d.value = R.fromEvent(m, n.value), E(), k());
664
- }
665
- function D(m, w, I) {
666
- if (m && a.value && w) {
667
- if (t.dragHandle) {
666
+ const x = m.target || m.srcElement;
667
+ h.value !== void 0 && x && !E(x, h.value) || c.value !== !1 && (document.body.click(), m.stopPropagation(), m.preventDefault(), u.value = R.fromEvent(m, a.value), F(), S());
668
+ }
669
+ function $(m, x, j) {
670
+ if (c.value && x) {
671
+ if (m)
672
+ h.value = m;
673
+ else if (t.dragHandle) {
668
674
  if (t.dragHandle instanceof HTMLElement)
669
- s.value = t.dragHandle;
675
+ h.value = t.dragHandle;
670
676
  else if (typeof t.dragHandle == "string") {
671
- const F = w.querySelector(t.dragHandle);
672
- F && (s.value = F);
677
+ const I = x.querySelector(t.dragHandle);
678
+ I && (h.value = I);
673
679
  }
674
- } else
675
- s.value = m;
676
- n.value = w, h.value = I, s.value.classList.add("ng-draggable"), s.value.addEventListener("mousedown", V);
680
+ }
681
+ a.value = x, s.value = j, h.value.classList.add("ng-draggable"), h.value.addEventListener("mousedown", D);
677
682
  }
678
683
  }
679
684
  return {
680
- registerDraggle: D,
681
- resetTranslate: E
685
+ registerDraggle: $,
686
+ resetTranslate: F
682
687
  };
683
688
  }
684
- function Ke(t, e) {
685
- const n = l(t.enableEsc);
686
- function a(f) {
687
- f.key === "Escape" && t.enableEsc && e.emit("esc", { event: f, type: "esc" });
689
+ function re(t, e) {
690
+ if (t) {
691
+ const n = (a) => {
692
+ a.key.toLowerCase() === t.toLowerCase() && e({ event: a, key: t });
693
+ };
694
+ return document.addEventListener("keydown", n), () => {
695
+ document.removeEventListener("keydown", n);
696
+ };
688
697
  }
689
- n.value && document.addEventListener("keydown", a);
690
698
  }
691
- const se = /* @__PURE__ */ ne({
699
+ function tt(t, e) {
700
+ const n = l(t.enableEsc);
701
+ let a = null;
702
+ return n.value ? (a = re("Escape", (c) => {
703
+ e.emit("esc", { event: c.event, type: "esc" });
704
+ }), {
705
+ remove: a
706
+ }) : null;
707
+ }
708
+ function nt(t, e) {
709
+ const n = l(t.enableEnter);
710
+ let a = null;
711
+ return n.value ? (a = re("Enter", (c) => {
712
+ e.emit("enter", { event: c.event, type: "enter" });
713
+ }), {
714
+ remove: a
715
+ }) : null;
716
+ }
717
+ const ce = /* @__PURE__ */ oe({
692
718
  name: "FModal",
693
- props: Ue,
694
- emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
719
+ props: Ze,
720
+ emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
695
721
  setup(t, e) {
696
- const n = l(t.width || 300), a = l(t.height || 200), f = l(t.modelValue), s = l(""), h = l(t.class), u = l(t.fitContent), d = l(t.showHeader), i = l(""), g = l(t.showCloseButton), T = l(t.showMaxButton), B = l(!1), z = l(""), S = l(""), O = l(""), x = l(t.showButtons), p = l(t.title), k = l(t.reiszeable), E = l(t.containment || null), V = l();
697
- function D(o, M) {
698
- f.value = !1, e.emit("update:modelValue", !1), M != null && e.emit(M ? "accept" : "cancel"), e.emit("closed", o);
722
+ const n = l(t.width || 300), a = l(t.height || 200), c = l(t.modelValue), d = l(""), h = l(t.class), s = l(t.fitContent), v = l(t.showHeader), u = l(""), w = l(t.showCloseButton), g = l(t.showMaxButton), B = l(!1), E = l(""), z = l(""), O = l(""), C = l(t.showButtons), p = l(t.title), T = l(t.reiszeable), S = l(t.containment || null), F = l();
723
+ function D(o, k) {
724
+ c.value = !1, e.emit("update:modelValue", !1), k != null && e.emit(k ? "accept" : "cancel"), e.emit("closed", o);
699
725
  }
700
- const m = [{
726
+ const $ = [{
701
727
  name: "cancel",
702
728
  text: "取消",
703
- class: "btn btn-light",
729
+ class: "btn btn-secondary",
704
730
  handle: (o) => {
705
731
  D(o, !1);
706
732
  }
@@ -711,114 +737,116 @@ const se = /* @__PURE__ */ ne({
711
737
  handle: (o) => {
712
738
  D(o, !0);
713
739
  }
714
- }], w = l(t.buttons && t.buttons.length ? t.buttons : m), I = y(() => !!i.value), F = y(() => !!x.value && !!w.value), j = l(), L = l(), N = l(!1), {
740
+ }], m = l(t.buttons && t.buttons.length ? t.buttons : $), x = y(() => !!u.value), j = y(() => !!C.value && !!m.value), I = l(), L = l(), V = l(!1), {
715
741
  renderResizeBar: K,
716
742
  maximize: G,
717
743
  restore: Q,
718
744
  boundingElement: U,
719
- resizedEventParam: c,
720
- allowDrag: v,
721
- unWindowResizeHandle: C
722
- } = qe(t), {
745
+ resizedEventParam: i,
746
+ allowDrag: f,
747
+ unWindowResizeHandle: M
748
+ } = _e(t), {
723
749
  registerDraggle: b
724
- } = Je(t);
725
- Y(() => t.title, (o, M) => {
726
- o !== M && (p.value = o);
727
- }), Y(() => t.modelValue, (o, M) => {
728
- o !== M && (f.value = o);
729
- }), Y(() => t.showHeader, (o, M) => {
730
- o !== M && (d.value = o);
731
- }), Y(() => t.showButtons, (o, M) => {
732
- o !== M && (x.value = o);
733
- }), Y(() => c.value, (o, M) => {
734
- const X = o || {}, q = M || {};
735
- JSON.stringify(X) !== JSON.stringify(q) && e.emit("resize", {
750
+ } = et(t, e, f);
751
+ X(() => t.title, (o, k) => {
752
+ o !== k && (p.value = o);
753
+ }), X(() => t.modelValue, (o, k) => {
754
+ o !== k && (c.value = o);
755
+ }), X(() => t.showHeader, (o, k) => {
756
+ o !== k && (v.value = o);
757
+ }), X(() => t.showButtons, (o, k) => {
758
+ o !== k && (C.value = o);
759
+ }), X(() => i.value, (o, k) => {
760
+ const Y = o || {}, q = k || {};
761
+ JSON.stringify(Y) !== JSON.stringify(q) && e.emit("resize", {
736
762
  newSize: o,
737
- oldSize: M
763
+ oldSize: k
738
764
  });
739
765
  });
740
766
  function H() {
741
767
  const o = document.querySelectorAll(".farris-modal").length;
742
- (!o || o - 1 <= 0) && document.body.classList.remove("modal-open"), V.value && V.value.classList.remove("show");
768
+ (!o || o - 1 <= 0) && document.body.classList.remove("modal-open"), F.value && F.value.classList.remove("show");
743
769
  }
744
- const Z = y(() => (f.value ? document.body.classList.add("modal-open") : H(), f.value)), ie = y(() => {
770
+ const Z = y(() => (c.value ? document.body.classList.add("modal-open") : H(), c.value)), ve = y(() => {
745
771
  const o = {
746
772
  modal: !0,
747
773
  "farris-modal": !0,
748
774
  fade: !0
749
775
  };
750
- return o["f-modal-fitContent"] = !!u.value, o.show = !!Z.value, o;
751
- }), ce = y(() => {
752
- var X;
776
+ return o["f-modal-fitContent"] = !!s.value, o.show = !!Z.value, o;
777
+ }), fe = y(() => {
778
+ var Y;
753
779
  const o = {
754
780
  "modal-dialog": !0
755
- }, M = (X = h.value) == null ? void 0 : X.split(" ");
756
- return M == null || M.reduce((q, Ce) => (q[Ce] = !0, q), o), o;
757
- }), re = y(() => ({
781
+ }, k = (Y = h.value) == null ? void 0 : Y.split(" ");
782
+ return k == null || k.reduce((q, Ee) => (q[Ee] = !0, q), o), o;
783
+ }), he = y(() => ({
758
784
  position: "absolute",
759
785
  top: `${(window.innerHeight - a.value) / 2}px`,
760
786
  left: `${(window.innerWidth - n.value) / 2}px`,
761
787
  width: `${n.value}px`,
762
- height: u.value ? "auto" : `${a.value}px`
763
- })), de = y(() => ({
788
+ height: s.value ? "auto" : `${a.value}px`
789
+ })), me = y(() => ({
764
790
  "modal-content": !0,
765
- "modal-content-has-header": d.value
766
- })), ve = y(() => {
791
+ "modal-content-has-header": v.value
792
+ })), ge = y(() => {
767
793
  const o = {
768
- display: d.value ? "" : "none"
794
+ display: v.value ? "" : "none"
769
795
  };
770
- return o["pointer-events"] = v.value ? "auto" : "none", o;
771
- }), fe = y(() => ({
796
+ return o["pointer-events"] = f.value ? "auto" : "none", o;
797
+ }), pe = y(() => ({
772
798
  "f-icon": !0,
773
799
  modal_maximize: !0,
774
- modalrevert: N.value
775
- })), he = y(() => ({
800
+ modalrevert: V.value
801
+ })), ye = y(() => ({
776
802
  "modal-body": !0,
777
- "f-utils-flex-column": z.value === "iframe"
803
+ "f-utils-flex-column": E.value === "iframe"
778
804
  }));
779
- function me() {
805
+ function we() {
780
806
  return {};
781
807
  }
782
- const ge = y(() => {
808
+ const xe = y(() => {
783
809
  const o = {
784
810
  textAlgin: O.value
785
- }, M = me();
786
- return Object.assign(o, M);
811
+ }, k = we();
812
+ return Object.assign(o, k);
787
813
  });
788
- function pe(o) {
789
- if (o.stopPropagation(), N.value) {
790
- N.value = !1, Q();
814
+ function le(o) {
815
+ if (o.stopPropagation(), V.value) {
816
+ V.value = !1, Q();
791
817
  return;
792
818
  }
793
- G(), N.value = !0;
819
+ G(), V.value = !0;
794
820
  }
795
- async function ye(o, M) {
796
- o.handle && await o.handle(M, o) && e.emit("closed", M);
821
+ async function be(o, k) {
822
+ o.handle && await o.handle(k, o) && e.emit("closed", k);
797
823
  }
798
- function we(o) {
799
- o.width && (n.value = o.width), o.height && (a.value = o.height), o.buttons && (w.value = o.buttons), o.title && (p.value = o.title);
824
+ function Ce(o) {
825
+ o.width && (n.value = o.width), o.height && (a.value = o.height), o.buttons && (m.value = o.buttons), o.title && (p.value = o.title);
800
826
  }
801
- ae(() => {
802
- L.value && !E.value && (E.value = L.value.parentElement, U.value = E.value, b(j.value, L.value, U.value)), Z.value && document.body.classList.add("modal-open"), Ke(t, e);
803
- }), le(() => {
804
- H(), C && C();
827
+ let _ = null, ee = null;
828
+ se(() => {
829
+ L.value && !S.value && (S.value = L.value.parentElement, U.value = S.value, b(I.value, L.value, U.value)), Z.value && document.body.classList.add("modal-open"), _ = tt(t, e), ee = nt(t, e);
830
+ }), ue(() => {
831
+ H(), M && M(), _ && _.remove(), ee && ee.remove();
805
832
  }), e.expose({
806
833
  modalElementRef: L,
807
- updateModalOptions: we,
808
- close: D
834
+ updateModalOptions: Ce,
835
+ close: D,
836
+ maxDialog: le
809
837
  });
810
- function xe() {
838
+ function Me() {
811
839
  return r("ul", null, [B.value && r("li", {
812
840
  class: "f-btn-icon f-bare"
813
841
  }, [r("span", {
814
842
  class: "f-icon modal_minimize"
815
- }, null)]), T.value && r("li", {
816
- onClick: pe,
843
+ }, null)]), g.value && r("li", {
844
+ onClick: le,
817
845
  class: "f-btn-icon f-bare",
818
846
  style: "pointer-events: auto;"
819
847
  }, [r("span", {
820
- class: fe.value
821
- }, null)]), g.value && r("li", {
848
+ class: pe.value
849
+ }, null)]), w.value && r("li", {
822
850
  class: "f-btn-icon f-bare",
823
851
  onClick: (o) => D(o, !1),
824
852
  style: "pointer-events: auto;"
@@ -826,120 +854,132 @@ const se = /* @__PURE__ */ ne({
826
854
  class: "f-icon modal_close"
827
855
  }, null)])]);
828
856
  }
829
- function be() {
857
+ function Te() {
830
858
  return r("div", {
831
859
  class: "modal-footer",
832
- style: ge.value
833
- }, [w.value && w.value.map((o) => r("button", {
860
+ style: xe.value
861
+ }, [m.value && m.value.map((o) => r("button", {
834
862
  name: o.name,
835
863
  type: "button",
836
864
  class: o.class + (o.iconClass ? " btn-icontext" : ""),
837
- onClick: (M) => {
838
- ye(o, M);
865
+ onClick: (k) => {
866
+ be(o, k);
839
867
  }
840
868
  }, [!!o.iconClass && r("i", {
841
869
  class: o.iconClass
842
870
  }, null), o.text]))]);
843
871
  }
844
- return () => r(ke, {
872
+ function ke() {
873
+ return r("div", {
874
+ ref: I,
875
+ class: "modal-header",
876
+ style: ge.value
877
+ }, [r("div", {
878
+ class: "modal-title"
879
+ }, [x.value && r("span", {
880
+ class: u.value,
881
+ style: "margin-right: 8px"
882
+ }, null), r("span", {
883
+ class: "modal-title-label"
884
+ }, [p.value])]), r("div", {
885
+ class: "actions"
886
+ }, [Me()])]);
887
+ }
888
+ function Be(o) {
889
+ o.stopPropagation();
890
+ }
891
+ return () => r(He, {
845
892
  to: "body"
846
893
  }, {
847
- default: () => {
848
- var o, M;
849
- return [Z.value && r("div", {
850
- class: ie.value,
851
- style: "display: block",
852
- ref: V
853
- }, [r("div", {
854
- id: s.value,
855
- class: ce.value,
856
- style: re.value,
857
- ref: L
858
- }, [r("div", {
859
- class: de.value
860
- }, [r("div", {
861
- ref: j,
862
- class: "modal-header",
863
- style: ve.value
864
- }, [r("div", {
865
- class: "modal-title"
866
- }, [I.value && r("span", {
867
- class: i.value,
868
- style: "margin-right: 8px"
869
- }, null), r("span", {
870
- class: "modal-title-label"
871
- }, [p.value])]), r("div", {
872
- class: "actions"
873
- }, [xe()])]), r("div", {
874
- class: he.value
875
- }, [(M = (o = e.slots).default) == null ? void 0 : M.call(o), z.value === "iframe" && r("iframe", {
876
- title: s.value,
877
- class: "f-utils-fill",
878
- width: "100%",
879
- frameborder: "0",
880
- src: S.value
881
- }, null)]), F.value && be()]), !u.value && k.value && L.value && K(L.value)])])];
882
- }
894
+ default: () => [Z.value && r(Oe, {
895
+ name: "fade",
896
+ appear: !0
897
+ }, {
898
+ default: () => {
899
+ var o, k;
900
+ return [r("div", {
901
+ class: ve.value,
902
+ style: "display: block",
903
+ ref: F,
904
+ onClick: Be
905
+ }, [r("div", {
906
+ id: d.value,
907
+ class: fe.value,
908
+ style: he.value,
909
+ ref: L
910
+ }, [r("div", {
911
+ class: me.value
912
+ }, [v.value && ke(), r("div", {
913
+ class: ye.value
914
+ }, [(k = (o = e.slots).default) == null ? void 0 : k.call(o), E.value === "iframe" && r("iframe", {
915
+ title: d.value,
916
+ class: "f-utils-fill",
917
+ width: "100%",
918
+ frameborder: "0",
919
+ src: z.value
920
+ }, null)]), j.value && Te()]), !s.value && T.value && L.value && K(L.value)])])];
921
+ }
922
+ })]
883
923
  });
884
924
  }
885
925
  });
886
- function ue(t) {
926
+ function de(t) {
887
927
  if (t.content && t.content.render)
888
928
  return t.content.render;
889
929
  if (t.render && typeof t.render == "function")
890
930
  return t.render;
891
931
  }
892
- function Ge(t) {
932
+ function at(t) {
893
933
  const e = document.createElement("div");
894
934
  e.style.display = "contents";
895
- const n = Ee({
896
- setup(a, f) {
897
- le(() => {
935
+ const n = je({
936
+ setup(a, c) {
937
+ ue(() => {
898
938
  document.body.removeChild(e);
899
939
  });
900
- const s = l(), h = l(t.class || ""), u = l(!!t.showButtons), d = l(!!t.showHeader), i = l(t.showCloseButton == null ? !0 : t.showCloseButton), g = l(!0), T = l(t.title || ""), B = t.acceptCallback || (() => {
901
- }), z = t.rejectCallback || (() => {
902
- }), S = t.closedCallback || ((k) => {
903
- }), O = t.resizeHandle || ((k) => {
904
- }), x = ue(t), p = (k) => {
905
- g.value = !1, n.unmount(), S(k);
940
+ const d = l(), h = l(t.class || ""), s = l(!!t.showButtons), v = l(!!t.showHeader), u = l(t.showCloseButton == null ? !0 : t.showCloseButton), w = l(!0), g = l(t.title || ""), B = t.acceptCallback || (() => {
941
+ }), E = t.rejectCallback || (() => {
942
+ }), z = t.closedCallback || ((T) => {
943
+ }), O = t.resizeHandle || ((T) => {
944
+ }), C = de(t), p = (T) => {
945
+ w.value = !1, n.unmount(), z(T);
906
946
  };
907
- return ae(() => {
908
- }), f.expose({
909
- modalRef: s
910
- }), () => r(se, {
911
- ref: s,
947
+ return se(() => {
948
+ }), c.expose({
949
+ modalRef: d
950
+ }), () => r(ce, {
951
+ ref: d,
912
952
  class: h.value,
913
- modelValue: g.value,
914
- "onUpdate:modelValue": (k) => g.value = k,
915
- title: T.value,
953
+ modelValue: w.value,
954
+ "onUpdate:modelValue": (T) => w.value = T,
955
+ title: g.value,
916
956
  width: t.width,
917
957
  height: t.height,
918
958
  buttons: t.buttons,
919
- "show-header": d.value,
920
- "show-buttons": u.value,
921
- "show-close-button": i.value,
959
+ "show-header": v.value,
960
+ "show-buttons": s.value,
961
+ "show-close-button": u.value,
922
962
  "show-max-button": !1,
923
963
  onAccept: B,
924
- onCancel: z,
964
+ onCancel: E,
925
965
  fitContent: t.fitContent == null ? !0 : t.fitContent,
926
966
  onClosed: p,
927
967
  onResize: O
928
968
  }, {
929
- default: () => [x && x(n)]
969
+ default: () => [C && C(n)]
930
970
  });
931
971
  }
932
972
  });
933
973
  return document.body.appendChild(e), n.mount(e), n;
934
974
  }
935
- class Qe {
975
+ class lt {
936
976
  constructor(e) {
937
- W(this, "appContext", null);
938
- W(this, "modalRef", l());
939
- W(this, "activeModalIndex", l(0));
940
- W(this, "modalRefs", {});
941
- W(this, "isUseEscCloseModal", l(!1));
942
- W(this, "activeModalInstance", y(() => this.modalRefs[this.activeModalIndex.value]));
977
+ N(this, "appContext", null);
978
+ N(this, "modalRef", l());
979
+ N(this, "activeModalIndex", l(0));
980
+ N(this, "modalRefs", {});
981
+ N(this, "isUseEscCloseModal", l(!1));
982
+ N(this, "activeModalInstance", y(() => this.modalRefs[this.activeModalIndex.value]));
943
983
  this.appContext = e ? e._context : null;
944
984
  }
945
985
  getCurrentModal() {
@@ -951,53 +991,53 @@ class Qe {
951
991
  showButtons: !0,
952
992
  showHeader: !0
953
993
  }, e);
954
- return Ge(n);
994
+ return at(n);
955
995
  }
956
996
  open(e) {
957
997
  const n = document.createDocumentFragment();
958
998
  e.showMaxButton && e.fitContent && (e.showMaxButton = !1);
959
- const a = ze(Object.assign({
999
+ const a = Ie(Object.assign({
960
1000
  title: "",
961
1001
  showButtons: !0,
962
1002
  showHeader: !0
963
- }, e)), f = l(!0), s = a.value.acceptCallback || (() => {
1003
+ }, e)), c = l(!0), d = a.value.acceptCallback || (() => {
964
1004
  }), h = a.value.rejectCallback || (() => {
965
- }), u = a.value.closedCallback || ((p, k) => {
966
- }), d = a.value.resizeHandle || ((p) => {
1005
+ }), s = a.value.closedCallback || ((p, T) => {
1006
+ }), v = a.value.resizeHandle || ((p) => {
967
1007
  });
968
- let i;
969
- const g = ue(a.value), T = (p) => {
970
- var E;
971
- f.value = !1;
972
- const k = (E = p == null ? void 0 : p.target) == null ? void 0 : E.classList.contains("modal_close");
973
- u(p, this.isUseEscCloseModal.value ? "esc" : k ? "icon" : "button");
1008
+ let u;
1009
+ const w = de(a.value), g = (p) => {
1010
+ var S;
1011
+ c.value = !1;
1012
+ const T = (S = p == null ? void 0 : p.target) == null ? void 0 : S.classList.contains("modal_close");
1013
+ s(p, this.isUseEscCloseModal.value ? "esc" : T ? "icon" : "button");
974
1014
  }, B = (p) => {
975
- T(p), i && Re(() => {
976
- if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], _(null, n), i = null, this.modalRef.value = null, this.modalRefs) {
977
- const k = Object.keys(this.modalRefs);
978
- k.length > 0 ? this.activeModalIndex.value = Math.max(...k) : this.activeModalIndex.value = 0;
1015
+ g(p), u && Le(() => {
1016
+ if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], te(null, n), u = null, this.modalRef.value = null, this.modalRefs) {
1017
+ const T = Object.keys(this.modalRefs);
1018
+ T.length > 0 ? this.activeModalIndex.value = Math.max(...T) : this.activeModalIndex.value = 0;
979
1019
  }
980
1020
  this.isUseEscCloseModal.value = !1;
981
1021
  });
982
- }, z = (p) => {
983
- var k;
984
- this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((k = this.activeModalInstance.value) == null || k.close(p == null ? void 0 : p.event));
985
- }, S = () => r(se, oe({
1022
+ }, E = (p) => {
1023
+ var T;
1024
+ this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((T = this.activeModalInstance.value) == null || T.close(p == null ? void 0 : p.event));
1025
+ }, z = () => r(ce, ie({
986
1026
  ref: this.modalRef,
987
- modelValue: f.value,
988
- "onUpdate:modelValue": (p) => f.value = p
1027
+ modelValue: c.value,
1028
+ "onUpdate:modelValue": (p) => c.value = p
989
1029
  }, a.value, {
990
- onAccept: s,
1030
+ onAccept: d,
991
1031
  onCancel: h,
992
1032
  onClosed: B,
993
- onResize: d,
994
- onEsc: z
1033
+ onResize: v,
1034
+ onEsc: E
995
1035
  }), {
996
- default: () => [g && g()]
1036
+ default: () => [w && w()]
997
1037
  });
998
- return i = ((p) => {
999
- const k = Se(S, p);
1000
- return k.appContext = this.appContext, _(k, n), k;
1038
+ return u = ((p) => {
1039
+ const T = Fe(z, p);
1040
+ return T.appContext = this.appContext, te(T, n), T;
1001
1041
  })({
1002
1042
  ...a.value
1003
1043
  // 'onUpdate:modelValue': onUpdateModelValue,
@@ -1006,7 +1046,7 @@ class Qe {
1006
1046
  a.value = {
1007
1047
  ...a.value,
1008
1048
  ...p
1009
- }, i && _(He(i, {
1049
+ }, u && te(De(u, {
1010
1050
  ...a
1011
1051
  }), n);
1012
1052
  },
@@ -1017,33 +1057,33 @@ class Qe {
1017
1057
  }
1018
1058
  class P {
1019
1059
  static show(e) {
1020
- let n = new Qe();
1021
- const a = A({
1060
+ let n = new lt();
1061
+ const a = W({
1022
1062
  ...e
1023
- }), f = !1, s = a.type === "error" || a.type === "prompt", h = a.type === "error" ? "错误提示" : a.type === "prompt" && a.title || "", u = a.acceptCallback || (() => {
1024
- }), d = a.rejectCallback || (() => {
1063
+ }), c = !1, d = a.type === "error" || a.type === "prompt", h = a.type === "error" ? "错误提示" : a.type === "prompt" && a.title || "", s = a.acceptCallback || (() => {
1064
+ }), v = a.rejectCallback || (() => {
1025
1065
  });
1026
- let i = null;
1027
- const g = () => {
1028
- i && (i == null || i.destroy(), n = null);
1066
+ let u = null;
1067
+ const w = () => {
1068
+ u && (u == null || u.destroy(), n = null);
1029
1069
  };
1030
- i = n == null ? void 0 : n.open({
1070
+ u = n == null ? void 0 : n.open({
1031
1071
  class: "modal-message modal-message-type-info",
1032
1072
  title: h,
1033
- showButtons: f,
1034
- showHeader: s,
1073
+ showButtons: c,
1074
+ showHeader: d,
1035
1075
  width: a.width || 400,
1036
1076
  fitContent: !0,
1037
1077
  showMaxButton: !1,
1038
- render: () => r(J, oe(a, {
1039
- onAccept: u,
1040
- onReject: d,
1041
- onClose: g
1078
+ render: () => r(J, ie(a, {
1079
+ onAccept: s,
1080
+ onReject: v,
1081
+ onClose: w
1042
1082
  }), null)
1043
1083
  });
1044
1084
  }
1045
1085
  static info(e, n) {
1046
- const a = A({
1086
+ const a = W({
1047
1087
  type: "info",
1048
1088
  title: e,
1049
1089
  detail: n,
@@ -1053,7 +1093,7 @@ class P {
1053
1093
  P.show(a);
1054
1094
  }
1055
1095
  static warning(e, n) {
1056
- const a = A({
1096
+ const a = W({
1057
1097
  type: "warning",
1058
1098
  title: e,
1059
1099
  detail: n,
@@ -1063,7 +1103,7 @@ class P {
1063
1103
  P.show(a);
1064
1104
  }
1065
1105
  static success(e, n) {
1066
- const a = A({
1106
+ const a = W({
1067
1107
  type: "success",
1068
1108
  title: e,
1069
1109
  detail: n,
@@ -1073,7 +1113,7 @@ class P {
1073
1113
  P.show(a);
1074
1114
  }
1075
1115
  static error(e, n, a) {
1076
- const f = A({
1116
+ const c = W({
1077
1117
  width: 500,
1078
1118
  type: "error",
1079
1119
  okButtonText: "关闭",
@@ -1084,10 +1124,10 @@ class P {
1084
1124
  detail: n
1085
1125
  }
1086
1126
  });
1087
- P.show(f);
1127
+ P.show(c);
1088
1128
  }
1089
1129
  static prompt(e, n) {
1090
- const a = A({
1130
+ const a = W({
1091
1131
  type: "prompt",
1092
1132
  title: e,
1093
1133
  detail: n,
@@ -1096,17 +1136,17 @@ class P {
1096
1136
  });
1097
1137
  P.show(a);
1098
1138
  }
1099
- static question(e, n, a, f) {
1100
- const s = A({
1139
+ static question(e, n, a, c) {
1140
+ const d = W({
1101
1141
  type: "question",
1102
1142
  title: e,
1103
1143
  detail: n,
1104
1144
  okButtonText: "确定",
1105
1145
  cancelButtonText: "取消",
1106
1146
  acceptCallback: a,
1107
- rejectCallback: f
1147
+ rejectCallback: c
1108
1148
  });
1109
- P.show(s);
1149
+ P.show(d);
1110
1150
  }
1111
1151
  }
1112
1152
  J.install = (t) => {
@@ -1116,5 +1156,5 @@ export {
1116
1156
  J as FMessageBox,
1117
1157
  P as FMessageBoxService,
1118
1158
  J as default,
1119
- Oe as messageBoxProps
1159
+ Pe as messageBoxProps
1120
1160
  };