@farris/ui-vue 1.2.5 → 1.2.7

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 (261) hide show
  1. package/components/accordion/index.esm.js +147 -139
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/accordion/package.json +1 -1
  4. package/components/avatar/index.esm.js +122 -131
  5. package/components/avatar/index.umd.cjs +1 -1
  6. package/components/avatar/package.json +1 -1
  7. package/components/border-editor/package.json +1 -1
  8. package/components/button/package.json +1 -1
  9. package/components/button-edit/index.css +1 -0
  10. package/components/button-edit/package.json +1 -1
  11. package/components/button-group/package.json +1 -1
  12. package/components/calculator/package.json +1 -1
  13. package/components/calendar/package.json +1 -1
  14. package/components/capsule/package.json +1 -1
  15. package/components/checkbox/index.esm.js +216 -223
  16. package/components/checkbox/index.umd.cjs +1 -1
  17. package/components/checkbox/package.json +1 -1
  18. package/components/color-picker/package.json +1 -1
  19. package/components/combo-list/index.esm.js +201 -181
  20. package/components/combo-list/index.umd.cjs +1 -1
  21. package/components/combo-list/package.json +1 -1
  22. package/components/combo-tree/index.esm.js +340 -107
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/combo-tree/package.json +1 -1
  25. package/components/common/package.json +1 -1
  26. package/components/component/index.esm.js +36 -29
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/component/package.json +1 -1
  29. package/components/condition/index.esm.js +341 -338
  30. package/components/condition/index.umd.cjs +1 -1
  31. package/components/condition/package.json +1 -1
  32. package/components/content-container/index.esm.js +9 -13
  33. package/components/content-container/index.umd.cjs +1 -1
  34. package/components/content-container/package.json +1 -1
  35. package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
  36. package/components/data-grid/index.esm.js +3415 -3295
  37. package/components/data-grid/index.umd.cjs +1 -1
  38. package/components/data-grid/package.json +1 -1
  39. package/components/data-view/index.esm.js +2719 -2717
  40. package/components/data-view/index.umd.cjs +1 -1
  41. package/components/data-view/package.json +1 -1
  42. package/components/date-picker/index.esm.js +31 -40
  43. package/components/date-picker/index.umd.cjs +1 -1
  44. package/components/date-picker/package.json +1 -1
  45. package/components/designer-canvas/index.esm.js +23 -20
  46. package/components/designer-canvas/index.umd.cjs +1 -1
  47. package/components/designer-canvas/package.json +1 -1
  48. package/components/designer-outline/package.json +1 -1
  49. package/components/designer-toolbox/package.json +1 -1
  50. package/components/discussion-editor/package.json +1 -1
  51. package/components/discussion-list/package.json +1 -1
  52. package/components/drawer/package.json +1 -1
  53. package/components/dropdown/index.esm.js +86 -86
  54. package/components/dropdown/index.umd.cjs +1 -1
  55. package/components/dropdown/package.json +1 -1
  56. package/components/dynamic-form/index.esm.js +578 -584
  57. package/components/dynamic-form/index.umd.cjs +1 -1
  58. package/components/dynamic-form/package.json +1 -1
  59. package/components/dynamic-resolver/index.esm.js +56 -47
  60. package/components/dynamic-resolver/index.umd.cjs +1 -1
  61. package/components/dynamic-resolver/package.json +1 -1
  62. package/components/dynamic-view/index.esm.js +287 -278
  63. package/components/dynamic-view/index.umd.cjs +1 -1
  64. package/components/dynamic-view/package.json +1 -1
  65. package/components/enum-editor/package.json +1 -1
  66. package/components/events-editor/package.json +1 -1
  67. package/components/expression-editor/package.json +1 -1
  68. package/components/external-container/index.css +1 -0
  69. package/components/external-container/index.esm.js +1923 -1908
  70. package/components/external-container/index.umd.cjs +1 -1
  71. package/components/external-container/package.json +1 -1
  72. package/components/field-selector/index.css +1 -0
  73. package/components/field-selector/index.esm.js +3719 -3604
  74. package/components/field-selector/index.umd.cjs +1 -1
  75. package/components/field-selector/package.json +1 -1
  76. package/components/filter-bar/{style.css → index.css} +1 -1
  77. package/components/filter-bar/index.esm.js +483 -470
  78. package/components/filter-bar/index.umd.cjs +1 -1
  79. package/components/filter-bar/package.json +1 -1
  80. package/components/flow-canvas/index.esm.js +37 -34
  81. package/components/flow-canvas/index.umd.cjs +1 -1
  82. package/components/flow-canvas/package.json +1 -1
  83. package/components/image-cropper/package.json +1 -1
  84. package/components/input-group/index.esm.js +258 -267
  85. package/components/input-group/index.umd.cjs +1 -1
  86. package/components/input-group/package.json +1 -1
  87. package/components/layout/package.json +1 -1
  88. package/components/list-nav/package.json +1 -1
  89. package/components/list-view/index.esm.js +1452 -1450
  90. package/components/list-view/index.umd.cjs +1 -1
  91. package/components/list-view/package.json +1 -1
  92. package/components/loading/package.json +1 -1
  93. package/components/locale/package.json +1 -1
  94. package/components/lookup/index.css +1 -0
  95. package/components/lookup/index.esm.js +4860 -4657
  96. package/components/lookup/index.umd.cjs +1 -1
  97. package/components/lookup/package.json +1 -1
  98. package/components/mapping-editor/index.css +1 -0
  99. package/components/mapping-editor/index.esm.js +4411 -4259
  100. package/components/mapping-editor/index.umd.cjs +1 -1
  101. package/components/mapping-editor/package.json +1 -1
  102. package/components/message-box/index.css +1 -0
  103. package/components/message-box/index.esm.js +397 -386
  104. package/components/message-box/index.umd.cjs +1 -1
  105. package/components/message-box/package.json +1 -1
  106. package/components/modal/index.css +1 -0
  107. package/components/modal/index.esm.js +308 -297
  108. package/components/modal/index.umd.cjs +1 -1
  109. package/components/modal/package.json +1 -1
  110. package/components/nav/package.json +1 -1
  111. package/components/notify/package.json +1 -1
  112. package/components/order/index.esm.js +763 -741
  113. package/components/order/index.umd.cjs +1 -1
  114. package/components/order/package.json +1 -1
  115. package/components/page-footer/package.json +1 -1
  116. package/components/page-header/index.esm.js +948 -945
  117. package/components/page-header/index.umd.cjs +1 -1
  118. package/components/page-header/package.json +1 -1
  119. package/components/pagination/package.json +1 -1
  120. package/components/popover/package.json +1 -1
  121. package/components/progress/package.json +1 -1
  122. package/components/property-editor/index.esm.js +485 -466
  123. package/components/property-editor/index.umd.cjs +2 -2
  124. package/components/property-editor/package.json +1 -1
  125. package/components/property-panel/index.esm.js +437 -426
  126. package/components/property-panel/index.umd.cjs +1 -1
  127. package/components/property-panel/package.json +1 -1
  128. package/components/radio-button/package.json +1 -1
  129. package/components/radio-group/index.esm.js +98 -107
  130. package/components/radio-group/index.umd.cjs +1 -1
  131. package/components/radio-group/package.json +1 -1
  132. package/components/rate/package.json +1 -1
  133. package/components/response-layout/package.json +1 -1
  134. package/components/response-layout-editor/{style.css → index.css} +1 -1
  135. package/components/response-layout-editor/index.esm.js +840 -800
  136. package/components/response-layout-editor/index.umd.cjs +1 -1
  137. package/components/response-layout-editor/package.json +1 -1
  138. package/components/response-toolbar/index.esm.js +757 -760
  139. package/components/response-toolbar/index.umd.cjs +1 -1
  140. package/components/response-toolbar/package.json +1 -1
  141. package/components/schema-selector/index.css +1 -0
  142. package/components/schema-selector/index.esm.js +3659 -3432
  143. package/components/schema-selector/index.umd.cjs +8 -1
  144. package/components/schema-selector/package.json +1 -1
  145. package/components/search-box/package.json +1 -1
  146. package/components/section/index.esm.js +21 -14
  147. package/components/section/index.umd.cjs +1 -1
  148. package/components/section/package.json +1 -1
  149. package/components/smoke-detector/package.json +1 -1
  150. package/components/spacing-editor/package.json +1 -1
  151. package/components/splitter/package.json +1 -1
  152. package/components/step/package.json +1 -1
  153. package/components/switch/index.esm.js +126 -135
  154. package/components/switch/index.umd.cjs +1 -1
  155. package/components/switch/package.json +1 -1
  156. package/components/tabs/index.css +1 -0
  157. package/components/tabs/index.esm.js +1400 -1379
  158. package/components/tabs/index.umd.cjs +1 -1
  159. package/components/tabs/package.json +1 -1
  160. package/components/tags/package.json +1 -1
  161. package/components/text/package.json +1 -1
  162. package/components/textarea/index.esm.js +97 -106
  163. package/components/textarea/index.umd.cjs +1 -1
  164. package/components/textarea/package.json +1 -1
  165. package/components/time-picker/index.css +1 -0
  166. package/components/time-picker/index.esm.js +393 -402
  167. package/components/time-picker/index.umd.cjs +1 -1
  168. package/components/time-picker/package.json +1 -1
  169. package/components/tooltip/package.json +1 -1
  170. package/components/transfer/index.esm.js +124 -122
  171. package/components/transfer/index.umd.cjs +1 -1
  172. package/components/transfer/package.json +1 -1
  173. package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
  174. package/components/tree-grid/index.esm.js +3531 -3412
  175. package/components/tree-grid/index.umd.cjs +1 -1
  176. package/components/tree-grid/package.json +1 -1
  177. package/components/tree-view/index.esm.js +2046 -2044
  178. package/components/tree-view/index.umd.cjs +1 -1
  179. package/components/tree-view/package.json +1 -1
  180. package/components/uploader/package.json +1 -1
  181. package/components/verify-detail/package.json +1 -1
  182. package/components/video/package.json +1 -1
  183. package/components/weather/package.json +1 -1
  184. package/farris.all.esm.js +12370 -11917
  185. package/farris.all.umd.cjs +9 -9
  186. package/index.css +1 -0
  187. package/package.json +2 -2
  188. package/types/combo-list/src/components/list-container.component.d.ts +6 -0
  189. package/types/combo-list/src/components/list-container.props.d.ts +9 -1
  190. package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
  191. package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
  192. package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
  193. package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
  194. package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
  195. package/types/components.d.ts +1 -0
  196. package/types/data-grid/index.d.ts +5 -5
  197. package/types/data-grid/src/data-grid.component.d.ts +2 -2
  198. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  199. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  200. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
  201. package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
  202. package/types/designer-canvas/src/composition/types.d.ts +1 -0
  203. package/types/dynamic-form/src/types.d.ts +1 -1
  204. package/types/dynamic-resolver/index.d.ts +1 -0
  205. package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
  206. package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
  207. package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
  208. package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
  209. package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
  210. package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
  211. package/types/modal/src/modal.component.d.ts +3 -3
  212. package/types/modal/src/modal.props.d.ts +3 -5
  213. package/types/page-header/src/page-header.props.d.ts +7 -0
  214. package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
  215. package/types/property-panel/src/composition/entity/base-property.d.ts +2 -16
  216. package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
  217. package/types/response-toolbar/index.d.ts +9 -3
  218. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
  219. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
  220. package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
  221. package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
  222. package/types/schema-selector/src/composition/types.d.ts +3 -1
  223. package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
  224. package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
  225. package/types/tabs/src/tabs.props.d.ts +8 -0
  226. package/components/button-edit/style.css +0 -1
  227. package/components/external-container/style.css +0 -1
  228. package/components/field-selector/style.css +0 -1
  229. package/components/lookup/style.css +0 -1
  230. package/components/mapping-editor/style.css +0 -1
  231. package/components/message-box/style.css +0 -1
  232. package/components/modal/style.css +0 -1
  233. package/components/schema-selector/style.css +0 -1
  234. package/components/tabs/style.css +0 -1
  235. package/components/time-picker/style.css +0 -1
  236. package/style.css +0 -1
  237. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
  238. /package/components/border-editor/{style.css → index.css} +0 -0
  239. /package/components/checkbox/{style.css → index.css} +0 -0
  240. /package/components/date-picker/{style.css → index.css} +0 -0
  241. /package/components/designer-canvas/{style.css → index.css} +0 -0
  242. /package/components/designer-outline/{style.css → index.css} +0 -0
  243. /package/components/designer-toolbox/{style.css → index.css} +0 -0
  244. /package/components/discussion-editor/{style.css → index.css} +0 -0
  245. /package/components/discussion-list/{style.css → index.css} +0 -0
  246. /package/components/drawer/{style.css → index.css} +0 -0
  247. /package/components/events-editor/{style.css → index.css} +0 -0
  248. /package/components/flow-canvas/{style.css → index.css} +0 -0
  249. /package/components/list-view/{style.css → index.css} +0 -0
  250. /package/components/order/{style.css → index.css} +0 -0
  251. /package/components/property-editor/{style.css → index.css} +0 -0
  252. /package/components/property-panel/{style.css → index.css} +0 -0
  253. /package/components/radio-button/{style.css → index.css} +0 -0
  254. /package/components/radio-group/{style.css → index.css} +0 -0
  255. /package/components/smoke-detector/{style.css → index.css} +0 -0
  256. /package/components/spacing-editor/{style.css → index.css} +0 -0
  257. /package/components/splitter/{style.css → index.css} +0 -0
  258. /package/components/switch/{style.css → index.css} +0 -0
  259. /package/components/transfer/{style.css → index.css} +0 -0
  260. /package/components/uploader/{style.css → index.css} +0 -0
  261. /package/components/weather/{style.css → index.css} +0 -0
@@ -1,8 +1,8 @@
1
- var me = Object.defineProperty;
2
- var ge = (t, e, l) => e in t ? me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[e] = l;
3
- var V = (t, e, l) => ge(t, typeof e != "symbol" ? e + "" : e, l);
4
- import { ref as s, createVNode as f, Fragment as ye, defineComponent as we, computed as k, watch as X, onMounted as G, onUnmounted as Q, Teleport as be, shallowRef as xe, createApp as pe, nextTick as Ce, render as _, h as Me, cloneVNode as ze, mergeProps as Ee } from "vue";
5
- const Be = {
1
+ var ge = Object.defineProperty;
2
+ var ye = (t, e, l) => e in t ? ge(t, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[e] = l;
3
+ var D = (t, e, l) => ye(t, typeof e != "symbol" ? e + "" : e, l);
4
+ import { ref as s, createVNode as h, Fragment as we, defineComponent as be, computed as k, watch as Y, onMounted as Q, onUnmounted as Z, Teleport as xe, shallowRef as pe, createApp as Ce, nextTick as Me, render as G, h as ze, cloneVNode as Ee, mergeProps as Be } from "vue";
5
+ const He = {
6
6
  /**
7
7
  * 自定义类
8
8
  */
@@ -54,7 +54,7 @@ const Be = {
54
54
  containment: { type: HTMLElement, default: null },
55
55
  reiszeable: { type: Boolean, default: !1 },
56
56
  draggable: { type: Boolean, default: !1 },
57
- dragHandle: { type: HTMLElement, default: null },
57
+ dragHandle: { type: Object, default: null },
58
58
  closedCallback: { type: Function, default: null },
59
59
  resizeHandle: { type: Function, default: null },
60
60
  render: { type: Function, default: null },
@@ -62,26 +62,26 @@ const Be = {
62
62
  rejectCallback: { type: Function, default: null },
63
63
  enableEsc: { type: Boolean, default: !0 }
64
64
  };
65
- class E {
65
+ class M {
66
66
  constructor(e, l) {
67
67
  this.x = e, this.y = l;
68
68
  }
69
69
  static getTransformInfo(e) {
70
- const i = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
71
- if (i.length >= 6) {
72
- const x = parseInt(i[4], 10), d = parseInt(i[5], 10);
73
- return { x, y: d };
70
+ const u = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
71
+ if (u.length >= 6) {
72
+ const x = parseInt(u[4], 10), r = parseInt(u[5], 10);
73
+ return { x, y: r };
74
74
  }
75
75
  return { x: 0, y: 0 };
76
76
  }
77
77
  static fromEvent(e, l = null) {
78
78
  if (this.isMouseEvent(e))
79
- return new E(e.clientX, e.clientY);
79
+ return new M(e.clientX, e.clientY);
80
80
  if (l === null || e.changedTouches.length === 1)
81
- return new E(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
82
- for (let i = 0; i < e.changedTouches.length; i++)
83
- if (e.changedTouches[i].target === l)
84
- return new E(e.changedTouches[i].clientX, e.changedTouches[i].clientY);
81
+ return new M(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
82
+ for (let u = 0; u < e.changedTouches.length; u++)
83
+ if (e.changedTouches[u].target === l)
84
+ return new M(e.changedTouches[u].clientX, e.changedTouches[u].clientY);
85
85
  }
86
86
  static isMouseEvent(e) {
87
87
  return Object.prototype.toString.apply(e).indexOf("MouseEvent") === 8;
@@ -90,19 +90,19 @@ class E {
90
90
  return !!e && "x" in e && "y" in e;
91
91
  }
92
92
  static getCurrent(e) {
93
- const l = new E(0, 0);
93
+ const l = new M(0, 0);
94
94
  if (window) {
95
- const i = window.getComputedStyle(e);
96
- if (i) {
97
- const x = parseInt(i.getPropertyValue("left"), 10), d = parseInt(i.getPropertyValue("top"), 10);
98
- l.x = isNaN(x) ? 0 : x, l.y = isNaN(d) ? 0 : d;
95
+ const u = window.getComputedStyle(e);
96
+ if (u) {
97
+ const x = parseInt(u.getPropertyValue("left"), 10), r = parseInt(u.getPropertyValue("top"), 10);
98
+ l.x = isNaN(x) ? 0 : x, l.y = isNaN(r) ? 0 : r;
99
99
  }
100
100
  return l;
101
101
  }
102
102
  return null;
103
103
  }
104
104
  static copy(e) {
105
- return new E(0, 0).set(e);
105
+ return new M(0, 0).set(e);
106
106
  }
107
107
  get value() {
108
108
  return { x: this.x, y: this.y };
@@ -126,39 +126,39 @@ class E {
126
126
  return this.x = e.x, this.y = e.y, this;
127
127
  }
128
128
  }
129
- class F {
129
+ class N {
130
130
  constructor(e, l) {
131
131
  this.width = e, this.height = l;
132
132
  }
133
133
  static getCurrent(e) {
134
- const l = new F(0, 0);
134
+ const l = new N(0, 0);
135
135
  if (window) {
136
- const i = window.getComputedStyle(e);
137
- return i && (l.width = parseInt(i.getPropertyValue("width"), 10), l.height = parseInt(i.getPropertyValue("height"), 10)), l;
136
+ const u = window.getComputedStyle(e);
137
+ return u && (l.width = parseInt(u.getPropertyValue("width"), 10), l.height = parseInt(u.getPropertyValue("height"), 10)), l;
138
138
  }
139
139
  return null;
140
140
  }
141
141
  static copy(e) {
142
- return new F(0, 0).set(e);
142
+ return new N(0, 0).set(e);
143
143
  }
144
144
  set(e) {
145
145
  return this.width = e.width, this.height = e.height, this;
146
146
  }
147
147
  }
148
148
  function Re(t, e) {
149
- const l = s(), i = s(), x = s(), d = s(), m = s(), c = s(), r = s(), v = s(), p = s(), T = s(), H = s(), R = s(), I = s(t.draggable), O = s(!1);
149
+ const l = s(), u = s(), x = s(), r = s(), g = s(), i = s(), d = s(), v = s(), p = s(), T = s(), H = s(), B = s(), I = s(t.draggable), O = s(!1);
150
150
  function S() {
151
- const n = i.value || document.body, o = window.getComputedStyle(n);
151
+ const n = u.value || document.body, o = window.getComputedStyle(n);
152
152
  if (!o || !l.value)
153
153
  return;
154
- const w = E.getTransformInfo(l.value), h = {};
155
- r.value && (h.deltaL = l.value.offsetLeft - r.value.x, h.deltaT = l.value.offsetTop - r.value.y);
154
+ const w = M.getTransformInfo(l.value), m = {};
155
+ d.value && (m.deltaL = l.value.offsetLeft - d.value.x, m.deltaT = l.value.offsetTop - d.value.y);
156
156
  const z = o.getPropertyValue("position");
157
- h.width = n.clientWidth, h.height = n.clientHeight, h.pr = parseInt(o.getPropertyValue("padding-right"), 10), h.pb = parseInt(o.getPropertyValue("padding-bottom"), 10), h.position = o.getPropertyValue("position"), z === "static" && (n.style.position = "relative"), h.translateX = w.x, h.translateY = w.y, T.value = h;
157
+ m.width = n.clientWidth, m.height = n.clientHeight, m.pr = parseInt(o.getPropertyValue("padding-right"), 10), m.pb = parseInt(o.getPropertyValue("padding-bottom"), 10), m.position = o.getPropertyValue("position"), z === "static" && (n.style.position = "relative"), m.translateX = w.x, m.translateY = w.y, T.value = m;
158
158
  }
159
- function g(n) {
159
+ function y(n) {
160
160
  if (l.value) {
161
- d.value = F.getCurrent(l.value), m.value = E.getCurrent(l.value), c.value = d.value ? F.copy(d.value) : null, r.value = m.value ? E.copy(m.value) : null, S();
161
+ r.value = N.getCurrent(l.value), g.value = M.getCurrent(l.value), i.value = r.value ? N.copy(r.value) : null, d.value = g.value ? M.copy(g.value) : null, S();
162
162
  const o = n.target.getAttribute("type") || "";
163
163
  v.value = {
164
164
  n: !!o.match(/n/),
@@ -169,46 +169,46 @@ function Re(t, e) {
169
169
  }
170
170
  }
171
171
  function C() {
172
- var n, o, w, h;
172
+ var n, o, w, m;
173
173
  if (l.value) {
174
174
  const z = l.value;
175
- v.value && ((v.value.n || v.value.s) && ((n = c.value) != null && n.height) && (z.style.height = c.value.height + "px"), (v.value.w || v.value.e) && ((o = c.value) != null && o.width) && (z.style.width = c.value.width + "px"), r.value && ((w = r.value) != null && w.x && (z.style.left = r.value.x + "px"), (h = r.value) != null && h.y && (z.style.top = r.value.y + "px")));
175
+ v.value && ((v.value.n || v.value.s) && ((n = i.value) != null && n.height) && (z.style.height = i.value.height + "px"), (v.value.w || v.value.e) && ((o = i.value) != null && o.width) && (z.style.width = i.value.width + "px"), d.value && ((w = d.value) != null && w.x && (z.style.left = d.value.x + "px"), (m = d.value) != null && m.y && (z.style.top = d.value.y + "px")));
176
176
  }
177
177
  }
178
178
  function L() {
179
179
  const n = t.minHeight ? t.minHeight : 1, o = t.minWidth ? t.minWidth : 1;
180
- c.value && r.value && v.value && d.value && (c.value.height < n && (c.value.height = n, v.value.n && m.value && (r.value.y = m.value.y + (d.value.height - n))), c.value.width < o && (c.value.width = o, v.value.w && m.value && (r.value.x = m.value.x + (d.value.width - o))), t.maxHeight && c.value.height > t.maxHeight && (c.value.height = t.maxHeight, m.value && v.value.n && (r.value.y = m.value.y + (d.value.height - t.maxHeight))), t.maxWidth && c.value.width > t.maxWidth && (c.value.width = t.maxWidth, v.value.w && m.value && (r.value.x = m.value.x + (d.value.width - t.maxWidth))));
180
+ i.value && d.value && v.value && r.value && (i.value.height < n && (i.value.height = n, v.value.n && g.value && (d.value.y = g.value.y + (r.value.height - n))), i.value.width < o && (i.value.width = o, v.value.w && g.value && (d.value.x = g.value.x + (r.value.width - o))), t.maxHeight && i.value.height > t.maxHeight && (i.value.height = t.maxHeight, g.value && v.value.n && (d.value.y = g.value.y + (r.value.height - t.maxHeight))), t.maxWidth && i.value.width > t.maxWidth && (i.value.width = t.maxWidth, v.value.w && g.value && (d.value.x = g.value.x + (r.value.width - t.maxWidth))));
181
181
  }
182
- function P() {
183
- if (i.value) {
182
+ function F() {
183
+ if (u.value) {
184
184
  const n = T.value;
185
- if (r.value && c.value && v.value && d.value) {
186
- const o = n.width - n.pr - n.deltaL - n.translateX - r.value.x, w = n.height - n.pb - n.deltaT - n.translateY - r.value.y;
187
- v.value.n && r.value.y + n.translateY < 0 && m.value && (r.value.y = -n.translateY, c.value.height = d.value.height + m.value.y + n.translateY), v.value.w && r.value.x + n.translateX < 0 && m.value && (r.value.x = -n.translateX, c.value.width = d.value.width + m.value.x + n.translateX), c.value.width > o && (c.value.width = o), c.value.height > w && (c.value.height = w);
185
+ if (d.value && i.value && v.value && r.value) {
186
+ const o = n.width - n.pr - n.deltaL - n.translateX - d.value.x, w = n.height - n.pb - n.deltaT - n.translateY - d.value.y;
187
+ v.value.n && d.value.y + n.translateY < 0 && g.value && (d.value.y = -n.translateY, i.value.height = r.value.height + g.value.y + n.translateY), v.value.w && d.value.x + n.translateX < 0 && g.value && (d.value.x = -n.translateX, i.value.width = r.value.width + g.value.x + n.translateX), i.value.width > o && (i.value.width = o), i.value.height > w && (i.value.height = w);
188
188
  }
189
189
  }
190
190
  }
191
- function D(n) {
192
- if (!x.value || !d.value || !m.value || !v.value)
191
+ function V(n) {
192
+ if (!x.value || !r.value || !g.value || !v.value)
193
193
  return;
194
194
  n.subtract(x.value);
195
195
  const o = n.x, w = n.y;
196
- v.value.n ? (r.value.y = m.value.y + w, c.value.height = d.value.height - w) : v.value.s && (c.value.height = d.value.height + w), v.value.e ? c.value.width = d.value.width + o : v.value.w && (c.value.width = d.value.width - o, r.value.x = m.value.x + o), P(), L(), C();
196
+ v.value.n ? (d.value.y = g.value.y + w, i.value.height = r.value.height - w) : v.value.s && (i.value.height = r.value.height + w), v.value.e ? i.value.width = r.value.width + o : v.value.w && (i.value.width = r.value.width - o, d.value.x = g.value.x + o), F(), L(), C();
197
197
  }
198
- function u(n) {
198
+ function c(n) {
199
199
  if (!p.value)
200
200
  return;
201
- const o = E.fromEvent(n);
202
- o && D(o);
201
+ const o = M.fromEvent(n);
202
+ o && V(o);
203
203
  }
204
- function y() {
204
+ function f() {
205
205
  if (l.value) {
206
206
  const {
207
207
  width: n,
208
208
  height: o,
209
209
  x: w,
210
- y: h
211
- } = l.value.getBoundingClientRect(), z = E.getTransformInfo(l.value);
210
+ y: m
211
+ } = l.value.getBoundingClientRect(), z = M.getTransformInfo(l.value);
212
212
  return {
213
213
  size: {
214
214
  width: n,
@@ -216,91 +216,91 @@ function Re(t, e) {
216
216
  },
217
217
  position: {
218
218
  x: w - z.x,
219
- y: h - z.y
219
+ y: m - z.y
220
220
  }
221
221
  };
222
222
  }
223
223
  return null;
224
224
  }
225
- function B(n) {
225
+ function E(n) {
226
226
  if (l.value) {
227
- const o = y();
227
+ const o = f();
228
228
  H.value = o;
229
229
  }
230
- x.value = void 0, d.value = null, m.value = null, c.value = null, r.value = null, v.value = null, p.value = null, document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", B);
230
+ x.value = void 0, r.value = null, g.value = null, i.value = null, d.value = null, v.value = null, p.value = null, document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", E);
231
231
  }
232
- function j() {
233
- document.addEventListener("mousemove", u), document.addEventListener("mouseup", B);
232
+ function P() {
233
+ document.addEventListener("mousemove", c), document.addEventListener("mouseup", E);
234
234
  }
235
- function M(n) {
236
- n instanceof MouseEvent && n.button === 2 || I.value && (n.stopPropagation(), n.preventDefault(), x.value = E.fromEvent(n), p.value = n.target, g(n), j());
235
+ function R(n) {
236
+ n instanceof MouseEvent && n.button === 2 || I.value && (n.stopPropagation(), n.preventDefault(), x.value = M.fromEvent(n), p.value = n.target, y(n), P());
237
237
  }
238
- function W(n) {
239
- return l.value = n, f(ye, null, [f("div", {
238
+ function j(n) {
239
+ return l.value = n, h(we, null, [h("div", {
240
240
  class: "ng-resizable-handle ng-resizable-n",
241
241
  type: "n",
242
- onMousedown: (o) => M(o)
243
- }, null), f("div", {
242
+ onMousedown: (o) => R(o)
243
+ }, null), h("div", {
244
244
  class: "ng-resizable-handle ng-resizable-e",
245
245
  type: "e",
246
- onMousedown: (o) => M(o)
247
- }, null), f("div", {
246
+ onMousedown: (o) => R(o)
247
+ }, null), h("div", {
248
248
  class: "ng-resizable-handle ng-resizable-s",
249
249
  type: "s",
250
- onMousedown: (o) => M(o)
251
- }, null), f("div", {
250
+ onMousedown: (o) => R(o)
251
+ }, null), h("div", {
252
252
  class: "ng-resizable-handle ng-resizable-w",
253
253
  type: "w",
254
- onMousedown: (o) => M(o)
255
- }, null), f("div", {
254
+ onMousedown: (o) => R(o)
255
+ }, null), h("div", {
256
256
  class: "ng-resizable-handle ng-resizable-ne",
257
257
  type: "ne",
258
- onMousedown: (o) => M(o)
259
- }, null), f("div", {
258
+ onMousedown: (o) => R(o)
259
+ }, null), h("div", {
260
260
  class: "ng-resizable-handle ng-resizable-se ng-resizable-diagonal",
261
261
  type: "se",
262
- onMousedown: (o) => M(o)
263
- }, null), f("div", {
262
+ onMousedown: (o) => R(o)
263
+ }, null), h("div", {
264
264
  class: "ng-resizable-handle ng-resizable-sw",
265
265
  type: "sw",
266
- onMousedown: (o) => M(o)
267
- }, null), f("div", {
266
+ onMousedown: (o) => R(o)
267
+ }, null), h("div", {
268
268
  class: "ng-resizable-handle ng-resizable-nw",
269
269
  type: "nw",
270
- onMousedown: (o) => M(o)
270
+ onMousedown: (o) => R(o)
271
271
  }, null)]);
272
272
  }
273
- function Y(n = !0) {
274
- const o = i.value || document.body, w = F.getCurrent(o), h = l.value;
275
- n && (R.value = y(), R.value.transform = h.style.transform), w && h && (c.value = w, h.style.height = c.value.height - 14 + "px", h.style.width = c.value.width - 14 + "px", h.style.left = "7px", h.style.top = "7px", h.style.transform = "", H.value = {
276
- size: c.value,
273
+ function W(n = !0) {
274
+ const o = u.value || document.body, w = N.getCurrent(o), m = l.value;
275
+ n && (B.value = f(), B.value.transform = m.style.transform), w && m && (i.value = w, m.style.height = i.value.height - 14 + "px", m.style.width = i.value.width - 14 + "px", m.style.left = "7px", m.style.top = "7px", m.style.transform = "", H.value = {
276
+ size: i.value,
277
277
  position: {
278
278
  x: 0,
279
279
  y: 0
280
280
  }
281
281
  }, I.value = !1, O.value = !0);
282
282
  }
283
- function J() {
283
+ function q() {
284
284
  var n, o;
285
- if (R.value) {
285
+ if (B.value) {
286
286
  const w = {
287
- width: R.value.size.width || 0,
288
- height: R.value.size.height || 0
289
- }, h = {
287
+ width: B.value.size.width || 0,
288
+ height: B.value.size.height || 0
289
+ }, m = {
290
290
  x: (window.innerWidth - w.width) / 2,
291
291
  y: (window.innerHeight - w.height) / 2
292
292
  };
293
- (n = c.value) == null || n.set(w), (o = r.value) == null || o.set(h);
293
+ (n = i.value) == null || n.set(w), (o = d.value) == null || o.set(m);
294
294
  const z = l.value;
295
- z.style.height = w.height + "px", z.style.width = w.width + "px", z.style.left = `${h.x}px`, z.style.top = `${h.y}px`, z.style.transform = "", H.value = {
295
+ z.style.height = w.height + "px", z.style.width = w.width + "px", z.style.left = `${m.x}px`, z.style.top = `${m.y}px`, z.style.transform = "", H.value = {
296
296
  size: w,
297
- position: h
297
+ position: m
298
298
  }, I.value = t.draggable, O.value = !1;
299
299
  }
300
300
  }
301
- function K() {
301
+ function J() {
302
302
  if (l.value) {
303
- const n = F.getCurrent(l.value);
303
+ const n = N.getCurrent(l.value);
304
304
  if (n) {
305
305
  const {
306
306
  width: o,
@@ -310,334 +310,345 @@ function Re(t, e) {
310
310
  }
311
311
  }
312
312
  }
313
- function A() {
313
+ function K() {
314
314
  const n = () => {
315
- O.value ? Y(!1) : K();
315
+ O.value ? W(!1) : J();
316
316
  };
317
317
  return window.addEventListener("resize", n), () => {
318
318
  window.removeEventListener("resize", n);
319
319
  };
320
320
  }
321
- const q = A();
321
+ const A = K();
322
322
  return {
323
- renderResizeBar: W,
324
- boundingElement: i,
323
+ renderResizeBar: j,
324
+ boundingElement: u,
325
325
  resizedEventParam: H,
326
- maximize: Y,
327
- restore: J,
326
+ maximize: W,
327
+ restore: q,
328
328
  allowDrag: I,
329
329
  isMaximized: O,
330
- unWindowResizeHandle: q
330
+ unWindowResizeHandle: A
331
331
  };
332
332
  }
333
- function He(t, e) {
334
- const l = s(), i = s(t.draggable), x = s(t.lockAxis), d = s(), m = s(), c = s(!1), r = s(new E(0, 0)), v = s(new E(0, 0)), p = s(new E(0, 0)), T = s(new E(0, 0));
335
- function H(u, y) {
336
- if (y.tagName === "BUTTON")
333
+ function Ie(t, e) {
334
+ const l = s(), u = s(t.draggable), x = s(t.lockAxis), r = s(), g = s(), i = s(!1), d = s(new M(0, 0)), v = s(new M(0, 0)), p = s(new M(0, 0)), T = s(new M(0, 0));
335
+ function H(c, f) {
336
+ if (f.tagName === "BUTTON")
337
337
  return !1;
338
- if (y === u)
338
+ if (f === c)
339
339
  return !0;
340
- for (const B in y.children)
341
- if (y.children.hasOwnProperty(B) && H(u, y.children[B]))
340
+ for (const E in f.children)
341
+ if (f.children.hasOwnProperty(E) && H(c, f.children[E]))
342
342
  return !0;
343
343
  return !1;
344
344
  }
345
- function R() {
346
- var j, M;
347
- let u = p.value.x + v.value.x, y = p.value.y + v.value.y;
348
- x.value === "x" ? (u = ((j = r.value) == null ? void 0 : j.x) || 0, p.value.x = 0) : x.value === "y" && (y = ((M = r.value) == null ? void 0 : M.y) || 0, p.value.y = 0);
349
- const B = `translate3d(${Math.round(u)}px, ${Math.round(y)}px, 0px)`;
350
- l.value && (l.value.style.transform = B), T.value.x = u, T.value.y = y;
345
+ function B() {
346
+ var P, R;
347
+ let c = p.value.x + v.value.x, f = p.value.y + v.value.y;
348
+ x.value === "x" ? (c = ((P = d.value) == null ? void 0 : P.x) || 0, p.value.x = 0) : x.value === "y" && (f = ((R = d.value) == null ? void 0 : R.y) || 0, p.value.y = 0);
349
+ const E = `translate3d(${Math.round(c)}px, ${Math.round(f)}px, 0px)`;
350
+ l.value && (l.value.style.transform = E), T.value.x = c, T.value.y = f;
351
351
  }
352
352
  function I() {
353
- if (!m.value || !l.value)
353
+ if (!g.value || !l.value)
354
354
  return null;
355
- const u = m.value.getBoundingClientRect(), y = l.value.getBoundingClientRect(), B = {
356
- top: u.top < y.top,
357
- right: u.right > y.right,
358
- bottom: u.bottom > y.bottom,
359
- left: u.left < y.left
355
+ const c = g.value.getBoundingClientRect(), f = l.value.getBoundingClientRect(), E = {
356
+ top: c.top < f.top,
357
+ right: c.right > f.right,
358
+ bottom: c.bottom > f.bottom,
359
+ left: c.left < f.left
360
360
  };
361
- return B.top || (p.value.y -= y.top - u.top), B.bottom || (p.value.y -= y.bottom - u.bottom), B.right || (p.value.x -= y.right - u.right), B.left || (p.value.x -= y.left - u.left), R(), B;
361
+ return E.top || (p.value.y -= f.top - c.top), E.bottom || (p.value.y -= f.bottom - c.bottom), E.right || (p.value.x -= f.right - c.right), E.left || (p.value.x -= f.left - c.left), B(), E;
362
362
  }
363
- function O(u) {
364
- u && (r.value && u.subtract(r.value), p.value.set(u), R(), I());
363
+ function O(c) {
364
+ c && (d.value && c.subtract(d.value), p.value.set(c), B(), I());
365
365
  }
366
- function S(u) {
367
- c.value && i.value && (u.stopPropagation(), u.preventDefault(), O(E.fromEvent(u, d.value)));
366
+ function S(c) {
367
+ i.value && u.value && (c.stopPropagation(), c.preventDefault(), O(M.fromEvent(c, r.value)));
368
368
  }
369
- function g() {
370
- var u;
371
- c.value && (c.value = !1, v.value.add(p.value), p.value.reset(), (u = l.value) == null || u.classList.remove("ng-dragging"), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", g));
369
+ function y() {
370
+ var c;
371
+ i.value && (i.value = !1, v.value.add(p.value), p.value.reset(), (c = l.value) == null || c.classList.remove("ng-dragging"), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", y));
372
372
  }
373
373
  function C() {
374
- !c.value && d.value && (c.value = !0, d.value.classList.add("ng-dragging"), document.addEventListener("mousemove", S), document.addEventListener("mouseup", g));
374
+ !i.value && r.value && (i.value = !0, r.value.classList.add("ng-dragging"), document.addEventListener("mousemove", S), document.addEventListener("mouseup", y));
375
375
  }
376
376
  function L() {
377
377
  if (l.value) {
378
- const u = E.getTransformInfo(l.value);
379
- v.value.set(u);
378
+ const c = M.getTransformInfo(l.value);
379
+ v.value.set(c);
380
380
  return;
381
381
  }
382
382
  v.value.reset();
383
383
  }
384
- function P(u) {
385
- if (u instanceof MouseEvent && u.button === 2)
384
+ function F(c) {
385
+ if (c instanceof MouseEvent && c.button === 2)
386
386
  return;
387
- const y = u.target || u.srcElement;
388
- d.value !== void 0 && y && !H(y, d.value) || i.value !== !1 && (u.stopPropagation(), u.preventDefault(), r.value = E.fromEvent(u, l.value), L(), C());
389
- }
390
- function D(u, y, B) {
391
- u && i.value && y && (d.value = u, l.value = y, m.value = B, u.classList.add("ng-draggable"), u.addEventListener("mousedown", P));
387
+ const f = c.target || c.srcElement;
388
+ r.value !== void 0 && f && !H(f, r.value) || u.value !== !1 && (c.stopPropagation(), c.preventDefault(), d.value = M.fromEvent(c, l.value), L(), C());
389
+ }
390
+ function V(c, f, E) {
391
+ if (c && u.value && f) {
392
+ if (t.dragHandle) {
393
+ if (t.dragHandle instanceof HTMLElement)
394
+ r.value = t.dragHandle;
395
+ else if (typeof t.dragHandle == "string") {
396
+ const P = f.querySelector(t.dragHandle);
397
+ P && (r.value = P);
398
+ }
399
+ } else
400
+ r.value = c;
401
+ l.value = f, g.value = E, r.value.classList.add("ng-draggable"), r.value.addEventListener("mousedown", F);
402
+ }
392
403
  }
393
404
  return {
394
- registerDraggle: D,
405
+ registerDraggle: V,
395
406
  resetTranslate: L
396
407
  };
397
408
  }
398
- function Ie(t, e) {
409
+ function ke(t, e) {
399
410
  const l = s(t.enableEsc);
400
- function i(x) {
411
+ function u(x) {
401
412
  x.key === "Escape" && t.enableEsc && e.emit("esc", { event: x, type: "esc" });
402
413
  }
403
- l.value && document.addEventListener("keydown", i);
414
+ l.value && document.addEventListener("keydown", u);
404
415
  }
405
- const $ = /* @__PURE__ */ we({
416
+ const $ = /* @__PURE__ */ be({
406
417
  name: "FModal",
407
- props: Be,
418
+ props: He,
408
419
  emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
409
420
  setup(t, e) {
410
- const l = s(t.width || 300), i = s(t.height || 200), x = s(t.modelValue), d = s(""), m = s(t.class), c = s(t.fitContent), r = s(t.showHeader), v = s(""), p = s(t.showCloseButton), T = s(t.showMaxButton), H = s(!1), R = s(""), I = s(""), O = s(""), S = s(t.showButtons), g = s(t.title), C = s(t.reiszeable), L = s(t.containment || null);
411
- function P(a, b) {
421
+ const l = s(t.width || 300), u = s(t.height || 200), x = s(t.modelValue), r = s(""), g = s(t.class), i = s(t.fitContent), d = s(t.showHeader), v = s(""), p = s(t.showCloseButton), T = s(t.showMaxButton), H = s(!1), B = s(""), I = s(""), O = s(""), S = s(t.showButtons), y = s(t.title), C = s(t.reiszeable), L = s(t.containment || null), F = s();
422
+ function V(a, b) {
412
423
  x.value = !1, e.emit("update:modelValue", !1), b != null && e.emit(b ? "accept" : "cancel"), e.emit("closed", a);
413
424
  }
414
- const D = [{
425
+ const c = [{
415
426
  name: "cancel",
416
427
  text: "取消",
417
428
  class: "btn btn-light",
418
429
  handle: (a) => {
419
- P(a, !1);
430
+ V(a, !1);
420
431
  }
421
432
  }, {
422
433
  name: "accept",
423
434
  text: "确定",
424
435
  class: "btn btn-primary",
425
436
  handle: (a) => {
426
- P(a, !0);
437
+ V(a, !0);
427
438
  }
428
- }], u = s(t.buttons && t.buttons.length ? t.buttons : D), y = k(() => !!v.value), B = k(() => !!S.value && !!u.value), j = s(), M = s(), W = s(!1), {
429
- renderResizeBar: Y,
439
+ }], f = s(t.buttons && t.buttons.length ? t.buttons : c), E = k(() => !!v.value), P = k(() => !!S.value && !!f.value), R = s(), j = s(), W = s(!1), {
440
+ renderResizeBar: q,
430
441
  maximize: J,
431
442
  restore: K,
432
443
  boundingElement: A,
433
- resizedEventParam: q,
434
- allowDrag: n,
435
- unWindowResizeHandle: o
444
+ resizedEventParam: n,
445
+ allowDrag: o,
446
+ unWindowResizeHandle: w
436
447
  } = Re(t), {
437
- registerDraggle: w
438
- } = He(t);
439
- X(() => t.title, (a, b) => {
440
- a !== b && (g.value = a);
441
- }), X(() => t.modelValue, (a, b) => {
448
+ registerDraggle: m
449
+ } = Ie(t);
450
+ Y(() => t.title, (a, b) => {
451
+ a !== b && (y.value = a);
452
+ }), Y(() => t.modelValue, (a, b) => {
442
453
  a !== b && (x.value = a);
443
- }), X(() => t.showHeader, (a, b) => {
444
- a !== b && (r.value = a);
445
- }), X(() => t.showButtons, (a, b) => {
454
+ }), Y(() => t.showHeader, (a, b) => {
455
+ a !== b && (d.value = a);
456
+ }), Y(() => t.showButtons, (a, b) => {
446
457
  a !== b && (S.value = a);
447
- }), X(() => q.value, (a, b) => {
448
- const N = a || {}, U = b || {};
449
- JSON.stringify(N) !== JSON.stringify(U) && e.emit("resize", {
458
+ }), Y(() => n.value, (a, b) => {
459
+ const X = a || {}, U = b || {};
460
+ JSON.stringify(X) !== JSON.stringify(U) && e.emit("resize", {
450
461
  newSize: a,
451
462
  oldSize: b
452
463
  });
453
464
  });
454
- function h() {
465
+ function z() {
455
466
  const a = document.querySelectorAll(".farris-modal").length;
456
- (!a || a - 1 <= 0) && document.body.classList.remove("modal-open");
467
+ (!a || a - 1 <= 0) && document.body.classList.remove("modal-open"), F.value && F.value.classList.remove("show");
457
468
  }
458
- const z = k(() => (x.value ? document.body.classList.add("modal-open") : h(), x.value)), ee = k(() => {
469
+ const _ = k(() => (x.value ? document.body.classList.add("modal-open") : z(), x.value)), te = k(() => {
459
470
  const a = {
460
471
  modal: !0,
461
472
  "farris-modal": !0,
462
- fade: !0,
463
- show: z.value
473
+ fade: !0
464
474
  };
465
- return a["f-modal-fitContent"] = !!c.value, a;
466
- }), te = k(() => {
467
- var N;
475
+ return a["f-modal-fitContent"] = !!i.value, a.show = !!_.value, a;
476
+ }), le = k(() => {
477
+ var X;
468
478
  const a = {
469
479
  "modal-dialog": !0
470
- }, b = (N = m.value) == null ? void 0 : N.split(" ");
471
- return b == null || b.reduce((U, he) => (U[he] = !0, U), a), a;
472
- }), le = k(() => ({
480
+ }, b = (X = g.value) == null ? void 0 : X.split(" ");
481
+ return b == null || b.reduce((U, me) => (U[me] = !0, U), a), a;
482
+ }), ae = k(() => ({
473
483
  position: "absolute",
474
- top: `${(window.innerHeight - i.value) / 2}px`,
484
+ top: `${(window.innerHeight - u.value) / 2}px`,
475
485
  left: `${(window.innerWidth - l.value) / 2}px`,
476
486
  width: `${l.value}px`,
477
- height: c.value ? "auto" : `${i.value}px`
478
- })), ae = k(() => ({
487
+ height: i.value ? "auto" : `${u.value}px`
488
+ })), ne = k(() => ({
479
489
  "modal-content": !0,
480
- "modal-content-has-header": r.value
481
- })), ne = k(() => {
490
+ "modal-content-has-header": d.value
491
+ })), se = k(() => {
482
492
  const a = {
483
- display: r.value ? "" : "none"
493
+ display: d.value ? "" : "none"
484
494
  };
485
- return a["pointer-events"] = n.value ? "auto" : "none", a;
486
- }), se = k(() => ({
495
+ return a["pointer-events"] = o.value ? "auto" : "none", a;
496
+ }), oe = k(() => ({
487
497
  "f-icon": !0,
488
498
  modal_maximize: !0,
489
499
  modalrevert: W.value
490
- })), oe = k(() => ({
500
+ })), ue = k(() => ({
491
501
  "modal-body": !0,
492
- "f-utils-flex-column": R.value === "iframe"
502
+ "f-utils-flex-column": B.value === "iframe"
493
503
  }));
494
- function ue() {
504
+ function ie() {
495
505
  return {};
496
506
  }
497
- const ie = k(() => {
507
+ const ce = k(() => {
498
508
  const a = {
499
509
  textAlgin: O.value
500
- }, b = ue();
510
+ }, b = ie();
501
511
  return Object.assign(a, b);
502
512
  });
503
- function ce(a) {
513
+ function re(a) {
504
514
  if (a.stopPropagation(), W.value) {
505
515
  W.value = !1, K();
506
516
  return;
507
517
  }
508
518
  J(), W.value = !0;
509
519
  }
510
- async function re(a, b) {
520
+ async function de(a, b) {
511
521
  a.handle && await a.handle(b, a) && e.emit("closed", b);
512
522
  }
513
- function de(a) {
514
- a.width && (l.value = a.width), a.height && (i.value = a.height), a.buttons && (u.value = a.buttons), a.title && (g.value = a.title);
523
+ function ve(a) {
524
+ a.width && (l.value = a.width), a.height && (u.value = a.height), a.buttons && (f.value = a.buttons), a.title && (y.value = a.title);
515
525
  }
516
- G(() => {
517
- M.value && !L.value && (L.value = M.value.parentElement, A.value = L.value, w(j.value, M.value, A.value)), z.value && document.body.classList.add("modal-open"), Ie(t, e);
518
- }), Q(() => {
519
- h(), o && o();
526
+ Q(() => {
527
+ j.value && !L.value && (L.value = j.value.parentElement, A.value = L.value, m(R.value, j.value, A.value)), _.value && document.body.classList.add("modal-open"), ke(t, e);
528
+ }), Z(() => {
529
+ z(), w && w();
520
530
  }), e.expose({
521
- modalElementRef: M,
522
- updateModalOptions: de,
523
- close: P
531
+ modalElementRef: j,
532
+ updateModalOptions: ve,
533
+ close: V
524
534
  });
525
- function ve() {
526
- return f("ul", null, [H.value && f("li", {
535
+ function fe() {
536
+ return h("ul", null, [H.value && h("li", {
527
537
  class: "f-btn-icon f-bare"
528
- }, [f("span", {
538
+ }, [h("span", {
529
539
  class: "f-icon modal_minimize"
530
- }, null)]), T.value && f("li", {
531
- onClick: ce,
540
+ }, null)]), T.value && h("li", {
541
+ onClick: re,
532
542
  class: "f-btn-icon f-bare",
533
543
  style: "pointer-events: auto;"
534
- }, [f("span", {
535
- class: se.value
536
- }, null)]), p.value && f("li", {
544
+ }, [h("span", {
545
+ class: oe.value
546
+ }, null)]), p.value && h("li", {
537
547
  class: "f-btn-icon f-bare",
538
- onClick: (a) => P(a, !1),
548
+ onClick: (a) => V(a, !1),
539
549
  style: "pointer-events: auto;"
540
- }, [f("span", {
550
+ }, [h("span", {
541
551
  class: "f-icon modal_close"
542
552
  }, null)])]);
543
553
  }
544
- function fe() {
545
- return f("div", {
554
+ function he() {
555
+ return h("div", {
546
556
  class: "modal-footer",
547
- style: ie.value
548
- }, [u.value && u.value.map((a) => f("button", {
557
+ style: ce.value
558
+ }, [f.value && f.value.map((a) => h("button", {
549
559
  name: a.name,
550
560
  type: "button",
551
561
  class: a.class + (a.iconClass ? " btn-icontext" : ""),
552
562
  onClick: (b) => {
553
- re(a, b);
563
+ de(a, b);
554
564
  }
555
- }, [!!a.iconClass && f("i", {
565
+ }, [!!a.iconClass && h("i", {
556
566
  class: a.iconClass
557
567
  }, null), a.text]))]);
558
568
  }
559
- return () => f(be, {
569
+ return () => h(xe, {
560
570
  to: "body"
561
571
  }, {
562
572
  default: () => {
563
573
  var a, b;
564
- return [z.value && f("div", {
565
- class: ee.value,
566
- style: "display: block"
567
- }, [f("div", {
568
- id: d.value,
574
+ return [_.value && h("div", {
569
575
  class: te.value,
570
- style: le.value,
571
- ref: M
572
- }, [f("div", {
573
- class: ae.value
574
- }, [f("div", {
575
- ref: j,
576
+ style: "display: block",
577
+ ref: F
578
+ }, [h("div", {
579
+ id: r.value,
580
+ class: le.value,
581
+ style: ae.value,
582
+ ref: j
583
+ }, [h("div", {
584
+ class: ne.value
585
+ }, [h("div", {
586
+ ref: R,
576
587
  class: "modal-header",
577
- style: ne.value
578
- }, [f("div", {
588
+ style: se.value
589
+ }, [h("div", {
579
590
  class: "modal-title"
580
- }, [y.value && f("span", {
591
+ }, [E.value && h("span", {
581
592
  class: v.value,
582
593
  style: "margin-right: 8px"
583
- }, null), f("span", {
594
+ }, null), h("span", {
584
595
  class: "modal-title-label"
585
- }, [g.value])]), f("div", {
596
+ }, [y.value])]), h("div", {
586
597
  class: "actions"
587
- }, [ve()])]), f("div", {
588
- class: oe.value
589
- }, [(b = (a = e.slots).default) == null ? void 0 : b.call(a), R.value === "iframe" && f("iframe", {
590
- title: d.value,
598
+ }, [fe()])]), h("div", {
599
+ class: ue.value
600
+ }, [(b = (a = e.slots).default) == null ? void 0 : b.call(a), B.value === "iframe" && h("iframe", {
601
+ title: r.value,
591
602
  class: "f-utils-fill",
592
603
  width: "100%",
593
604
  frameborder: "0",
594
605
  src: I.value
595
- }, null)]), B.value && fe()]), !c.value && C.value && M.value && Y(M.value)])])];
606
+ }, null)]), P.value && he()]), !i.value && C.value && j.value && q(j.value)])])];
596
607
  }
597
608
  });
598
609
  }
599
610
  });
600
- function Z(t) {
611
+ function ee(t) {
601
612
  if (t.content && t.content.render)
602
613
  return t.content.render;
603
614
  if (t.render && typeof t.render == "function")
604
615
  return t.render;
605
616
  }
606
- function ke(t) {
617
+ function Te(t) {
607
618
  const e = document.createElement("div");
608
619
  e.style.display = "contents";
609
- const l = pe({
610
- setup(i, x) {
611
- Q(() => {
620
+ const l = Ce({
621
+ setup(u, x) {
622
+ Z(() => {
612
623
  document.body.removeChild(e);
613
624
  });
614
- const d = s(), m = s(t.class || ""), c = s(!!t.showButtons), r = s(!!t.showHeader), v = s(t.showCloseButton == null ? !0 : t.showCloseButton), p = s(!0), T = s(t.title || ""), H = t.acceptCallback || (() => {
615
- }), R = t.rejectCallback || (() => {
625
+ const r = s(), g = s(t.class || ""), i = s(!!t.showButtons), d = s(!!t.showHeader), v = s(t.showCloseButton == null ? !0 : t.showCloseButton), p = s(!0), T = s(t.title || ""), H = t.acceptCallback || (() => {
626
+ }), B = t.rejectCallback || (() => {
616
627
  }), I = t.closedCallback || ((C) => {
617
628
  }), O = t.resizeHandle || ((C) => {
618
- }), S = Z(t), g = (C) => {
629
+ }), S = ee(t), y = (C) => {
619
630
  p.value = !1, l.unmount(), I(C);
620
631
  };
621
- return G(() => {
632
+ return Q(() => {
622
633
  }), x.expose({
623
- modalRef: d
624
- }), () => f($, {
625
- ref: d,
626
- class: m.value,
634
+ modalRef: r
635
+ }), () => h($, {
636
+ ref: r,
637
+ class: g.value,
627
638
  modelValue: p.value,
628
639
  "onUpdate:modelValue": (C) => p.value = C,
629
640
  title: T.value,
630
641
  width: t.width,
631
642
  height: t.height,
632
643
  buttons: t.buttons,
633
- "show-header": r.value,
634
- "show-buttons": c.value,
644
+ "show-header": d.value,
645
+ "show-buttons": i.value,
635
646
  "show-close-button": v.value,
636
647
  "show-max-button": !1,
637
648
  onAccept: H,
638
- onCancel: R,
649
+ onCancel: B,
639
650
  fitContent: t.fitContent == null ? !0 : t.fitContent,
640
- onClosed: g,
651
+ onClosed: y,
641
652
  onResize: O
642
653
  }, {
643
654
  default: () => [S && S(l)]
@@ -646,14 +657,14 @@ function ke(t) {
646
657
  });
647
658
  return document.body.appendChild(e), l.mount(e), l;
648
659
  }
649
- class Te {
660
+ class Oe {
650
661
  constructor(e) {
651
- V(this, "appContext", null);
652
- V(this, "modalRef", s());
653
- V(this, "activeModalIndex", s(0));
654
- V(this, "modalRefs", {});
655
- V(this, "isUseEscCloseModal", s(!1));
656
- V(this, "activeModalInstance", k(() => this.modalRefs[this.activeModalIndex.value]));
662
+ D(this, "appContext", null);
663
+ D(this, "modalRef", s());
664
+ D(this, "activeModalIndex", s(0));
665
+ D(this, "modalRefs", {});
666
+ D(this, "isUseEscCloseModal", s(!1));
667
+ D(this, "activeModalInstance", k(() => this.modalRefs[this.activeModalIndex.value]));
657
668
  this.appContext = e ? e._context : null;
658
669
  }
659
670
  getCurrentModal() {
@@ -665,63 +676,63 @@ class Te {
665
676
  showButtons: !0,
666
677
  showHeader: !0
667
678
  }, e);
668
- return ke(l);
679
+ return Te(l);
669
680
  }
670
681
  open(e) {
671
682
  const l = document.createDocumentFragment();
672
683
  e.showMaxButton && e.fitContent && (e.showMaxButton = !1);
673
- const i = xe(Object.assign({
684
+ const u = pe(Object.assign({
674
685
  title: "",
675
686
  showButtons: !0,
676
687
  showHeader: !0
677
- }, e)), x = s(!0), d = i.value.acceptCallback || (() => {
678
- }), m = i.value.rejectCallback || (() => {
679
- }), c = i.value.closedCallback || ((g, C) => {
680
- }), r = i.value.resizeHandle || ((g) => {
688
+ }, e)), x = s(!0), r = u.value.acceptCallback || (() => {
689
+ }), g = u.value.rejectCallback || (() => {
690
+ }), i = u.value.closedCallback || ((y, C) => {
691
+ }), d = u.value.resizeHandle || ((y) => {
681
692
  });
682
693
  let v;
683
- const p = Z(i.value), T = (g) => {
694
+ const p = ee(u.value), T = (y) => {
684
695
  var L;
685
696
  x.value = !1;
686
- const C = (L = g == null ? void 0 : g.target) == null ? void 0 : L.classList.contains("modal_close");
687
- c(g, this.isUseEscCloseModal.value ? "esc" : C ? "icon" : "button");
688
- }, H = (g) => {
689
- T(g), v && Ce(() => {
690
- if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], _(null, l), v = null, this.modalRef.value = null, this.modalRefs) {
697
+ const C = (L = y == null ? void 0 : y.target) == null ? void 0 : L.classList.contains("modal_close");
698
+ i(y, this.isUseEscCloseModal.value ? "esc" : C ? "icon" : "button");
699
+ }, H = (y) => {
700
+ T(y), v && Me(() => {
701
+ if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], G(null, l), v = null, this.modalRef.value = null, this.modalRefs) {
691
702
  const C = Object.keys(this.modalRefs);
692
703
  C.length > 0 ? this.activeModalIndex.value = Math.max(...C) : this.activeModalIndex.value = 0;
693
704
  }
694
705
  this.isUseEscCloseModal.value = !1;
695
706
  });
696
- }, R = (g) => {
707
+ }, B = (y) => {
697
708
  var C;
698
- this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((C = this.activeModalInstance.value) == null || C.close(g == null ? void 0 : g.event));
699
- }, I = () => f($, Ee({
709
+ this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((C = this.activeModalInstance.value) == null || C.close(y == null ? void 0 : y.event));
710
+ }, I = () => h($, Be({
700
711
  ref: this.modalRef,
701
712
  modelValue: x.value,
702
- "onUpdate:modelValue": (g) => x.value = g
703
- }, i.value, {
704
- onAccept: d,
705
- onCancel: m,
713
+ "onUpdate:modelValue": (y) => x.value = y
714
+ }, u.value, {
715
+ onAccept: r,
716
+ onCancel: g,
706
717
  onClosed: H,
707
- onResize: r,
708
- onEsc: R
718
+ onResize: d,
719
+ onEsc: B
709
720
  }), {
710
721
  default: () => [p && p()]
711
722
  });
712
- return v = ((g) => {
713
- const C = Me(I, g);
714
- return C.appContext = this.appContext, _(C, l), C;
723
+ return v = ((y) => {
724
+ const C = ze(I, y);
725
+ return C.appContext = this.appContext, G(C, l), C;
715
726
  })({
716
- ...i.value
727
+ ...u.value
717
728
  // 'onUpdate:modelValue': onUpdateModelValue,
718
729
  }), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
719
- update: (g) => {
720
- i.value = {
721
- ...i.value,
722
- ...g
723
- }, v && _(ze(v, {
724
- ...i
730
+ update: (y) => {
731
+ u.value = {
732
+ ...u.value,
733
+ ...y
734
+ }, v && G(Ee(v, {
735
+ ...u
725
736
  }), l);
726
737
  },
727
738
  destroy: H,
@@ -729,17 +740,17 @@ class Te {
729
740
  };
730
741
  }
731
742
  }
732
- const Oe = Symbol("FModalService"), Pe = {
743
+ const Se = Symbol("FModalService"), je = {
733
744
  install(t) {
734
745
  t.component($.name, $);
735
- const e = new Te(t);
736
- t.provide(Oe, e), t.provide("FModalService", e);
746
+ const e = new Oe(t);
747
+ t.provide(Se, e), t.provide("FModalService", e);
737
748
  }
738
749
  };
739
750
  export {
740
751
  $ as FModal,
741
- Te as FModalService,
742
- Oe as F_MODAL_SERVICE_TOKEN,
743
- Pe as default,
744
- Be as modalProps
752
+ Oe as FModalService,
753
+ Se as F_MODAL_SERVICE_TOKEN,
754
+ je as default,
755
+ He as modalProps
745
756
  };