@farris/ui-vue 1.2.7 → 1.2.9

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 (246) hide show
  1. package/components/accordion/index.esm.js +136 -136
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +418 -456
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/border-editor/index.esm.js +4 -4
  6. package/components/border-editor/index.umd.cjs +1 -1
  7. package/components/button/index.esm.js +1 -1
  8. package/components/button/index.umd.cjs +1 -1
  9. package/components/button-edit/index.esm.js +363 -436
  10. package/components/button-edit/index.umd.cjs +1 -1
  11. package/components/button-group/index.esm.js +5 -5
  12. package/components/button-group/index.umd.cjs +1 -1
  13. package/components/calendar/index.esm.js +417 -417
  14. package/components/calendar/index.umd.cjs +1 -1
  15. package/components/capsule/index.esm.js +176 -176
  16. package/components/capsule/index.umd.cjs +1 -1
  17. package/components/checkbox/index.esm.js +557 -594
  18. package/components/checkbox/index.umd.cjs +1 -1
  19. package/components/color-picker/index.esm.js +119 -119
  20. package/components/color-picker/index.umd.cjs +2 -2
  21. package/components/combo-list/index.esm.js +502 -535
  22. package/components/combo-list/index.umd.cjs +1 -1
  23. package/components/combo-tree/index.esm.js +69 -69
  24. package/components/combo-tree/index.umd.cjs +1 -1
  25. package/components/component/index.esm.js +387 -275
  26. package/components/component/index.umd.cjs +1 -1
  27. package/components/condition/index.esm.js +1219 -983
  28. package/components/condition/index.umd.cjs +1 -1
  29. package/components/content-container/index.esm.js +292 -219
  30. package/components/content-container/index.umd.cjs +1 -1
  31. package/components/data-grid/index.css +1 -1
  32. package/components/data-grid/index.esm.js +5718 -5546
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3291 -2930
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2650 -2682
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/dependent-base/style.js +1 -0
  39. package/components/dependent-fluid/style.js +1 -0
  40. package/components/dependent-icon/style.js +1 -0
  41. package/components/dependent-input/style.js +1 -0
  42. package/components/dependent-table/style.js +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +945 -932
  45. package/components/designer-canvas/index.umd.cjs +1 -1
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +175 -133
  48. package/components/designer-outline/index.umd.cjs +1 -1
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -1
  51. package/components/discussion-editor/index.esm.js +1 -1
  52. package/components/discussion-editor/index.umd.cjs +1 -1
  53. package/components/dropdown/index.esm.js +246 -246
  54. package/components/dropdown/index.umd.cjs +2 -2
  55. package/components/dynamic-form/index.esm.js +1319 -1172
  56. package/components/dynamic-form/index.umd.cjs +1 -1
  57. package/components/dynamic-resolver/index.esm.js +119 -82
  58. package/components/dynamic-resolver/index.umd.cjs +1 -1
  59. package/components/dynamic-view/index.esm.js +258 -249
  60. package/components/dynamic-view/index.umd.cjs +1 -1
  61. package/components/enum-editor/index.esm.js +3 -3
  62. package/components/enum-editor/index.umd.cjs +1 -1
  63. package/components/events-editor/index.esm.js +569 -514
  64. package/components/events-editor/index.umd.cjs +1 -1
  65. package/components/expression-editor/index.esm.js +104 -104
  66. package/components/expression-editor/index.umd.cjs +1 -1
  67. package/components/external-container/index.css +1 -1
  68. package/components/external-container/index.esm.js +3122 -2686
  69. package/components/external-container/index.umd.cjs +1 -1
  70. package/components/field-selector/index.css +1 -1
  71. package/components/field-selector/index.esm.js +6780 -6608
  72. package/components/field-selector/index.umd.cjs +1 -1
  73. package/components/filter-bar/index.css +1 -1
  74. package/components/filter-bar/index.esm.js +1466 -1523
  75. package/components/filter-bar/index.umd.cjs +1 -1
  76. package/components/flow-canvas/index.css +1 -1
  77. package/components/flow-canvas/index.esm.js +1048 -1035
  78. package/components/flow-canvas/index.umd.cjs +1 -1
  79. package/components/image-cropper/index.esm.js +422 -422
  80. package/components/image-cropper/index.umd.cjs +1 -1
  81. package/components/input-group/index.esm.js +674 -716
  82. package/components/input-group/index.umd.cjs +1 -1
  83. package/components/layout/index.esm.js +291 -291
  84. package/components/layout/index.umd.cjs +1 -1
  85. package/components/list-nav/index.esm.js +303 -230
  86. package/components/list-nav/index.umd.cjs +1 -1
  87. package/components/list-view/index.css +1 -1
  88. package/components/list-view/index.esm.js +2486 -2130
  89. package/components/list-view/index.umd.cjs +1 -1
  90. package/components/lookup/index.css +1 -1
  91. package/components/lookup/index.esm.js +7474 -7272
  92. package/components/lookup/index.umd.cjs +1 -1
  93. package/components/mapping-editor/index.css +1 -1
  94. package/components/mapping-editor/index.esm.js +6139 -5949
  95. package/components/mapping-editor/index.umd.cjs +1 -1
  96. package/components/message-box/index.esm.js +1 -1
  97. package/components/message-box/index.umd.cjs +1 -1
  98. package/components/modal/index.esm.js +1 -1
  99. package/components/modal/index.umd.cjs +1 -1
  100. package/components/nav/index.esm.js +432 -371
  101. package/components/nav/index.umd.cjs +3 -3
  102. package/components/number-range/index.esm.js +1124 -0
  103. package/components/number-range/index.umd.cjs +1 -0
  104. package/components/number-range/package.json +8 -0
  105. package/components/number-range/style.js +6 -0
  106. package/components/number-spinner/index.esm.js +1155 -0
  107. package/components/number-spinner/index.umd.cjs +1 -0
  108. package/components/number-spinner/package.json +8 -0
  109. package/components/number-spinner/style.js +4 -0
  110. package/components/order/index.css +1 -1
  111. package/components/order/index.esm.js +1215 -1178
  112. package/components/order/index.umd.cjs +1 -1
  113. package/components/page-footer/index.esm.js +147 -147
  114. package/components/page-footer/index.umd.cjs +1 -1
  115. package/components/page-header/index.esm.js +1240 -1346
  116. package/components/page-header/index.umd.cjs +1 -1
  117. package/components/pagination/index.esm.js +489 -428
  118. package/components/pagination/index.umd.cjs +1 -1
  119. package/components/progress/index.esm.js +220 -220
  120. package/components/progress/index.umd.cjs +3 -3
  121. package/components/property-editor/index.esm.js +1512 -1540
  122. package/components/property-editor/index.umd.cjs +3 -3
  123. package/components/property-panel/index.css +1 -1
  124. package/components/property-panel/index.esm.js +749 -815
  125. package/components/property-panel/index.umd.cjs +1 -1
  126. package/components/query-solution/index.css +1 -0
  127. package/components/query-solution/index.esm.js +7074 -0
  128. package/components/query-solution/index.umd.cjs +1 -0
  129. package/components/query-solution/package.json +8 -0
  130. package/components/query-solution/style.js +2 -0
  131. package/components/radio-button/index.esm.js +86 -86
  132. package/components/radio-button/index.umd.cjs +1 -1
  133. package/components/radio-group/index.esm.js +442 -479
  134. package/components/radio-group/index.umd.cjs +1 -1
  135. package/components/rate/index.esm.js +213 -208
  136. package/components/rate/index.umd.cjs +1 -1
  137. package/components/response-layout/index.esm.js +116 -116
  138. package/components/response-layout/index.umd.cjs +1 -1
  139. package/components/response-layout-editor/index.esm.js +943 -918
  140. package/components/response-layout-editor/index.umd.cjs +1 -1
  141. package/components/response-toolbar/index.esm.js +1174 -1295
  142. package/components/response-toolbar/index.umd.cjs +1 -1
  143. package/components/schema-selector/index.css +1 -1
  144. package/components/schema-selector/index.esm.js +5383 -5171
  145. package/components/schema-selector/index.umd.cjs +2 -2
  146. package/components/search-box/index.esm.js +201 -201
  147. package/components/search-box/index.umd.cjs +1 -1
  148. package/components/section/index.esm.js +684 -542
  149. package/components/section/index.umd.cjs +1 -1
  150. package/components/smoke-detector/index.esm.js +121 -121
  151. package/components/smoke-detector/index.umd.cjs +1 -1
  152. package/components/spacing-editor/index.esm.js +2 -2
  153. package/components/spacing-editor/index.umd.cjs +1 -1
  154. package/components/splitter/index.esm.js +1158 -382
  155. package/components/splitter/index.umd.cjs +1 -1
  156. package/components/step/index.esm.js +232 -232
  157. package/components/step/index.umd.cjs +1 -1
  158. package/components/switch/index.esm.js +451 -487
  159. package/components/switch/index.umd.cjs +1 -1
  160. package/components/tabs/index.esm.js +2078 -2168
  161. package/components/tabs/index.umd.cjs +1 -1
  162. package/components/tags/index.esm.js +318 -320
  163. package/components/tags/index.umd.cjs +1 -1
  164. package/components/text/index.esm.js +192 -192
  165. package/components/text/index.umd.cjs +1 -1
  166. package/components/textarea/index.esm.js +471 -497
  167. package/components/textarea/index.umd.cjs +1 -1
  168. package/components/time-picker/index.esm.js +1421 -1441
  169. package/components/time-picker/index.umd.cjs +1 -1
  170. package/components/transfer/index.css +1 -1
  171. package/components/transfer/index.esm.js +430 -421
  172. package/components/transfer/index.umd.cjs +1 -1
  173. package/components/tree-grid/index.css +1 -1
  174. package/components/tree-grid/index.esm.js +6806 -6624
  175. package/components/tree-grid/index.umd.cjs +1 -1
  176. package/components/tree-view/index.esm.js +2793 -2433
  177. package/components/tree-view/index.umd.cjs +1 -1
  178. package/components/uploader/index.esm.js +165 -165
  179. package/components/uploader/index.umd.cjs +2 -2
  180. package/components/verify-detail/index.esm.js +255 -255
  181. package/components/verify-detail/index.umd.cjs +1 -1
  182. package/components/video/index.esm.js +413 -334
  183. package/components/video/index.umd.cjs +1 -1
  184. package/components/weather/index.esm.js +902 -902
  185. package/components/weather/index.umd.cjs +4 -4
  186. package/farris.all.esm.js +54155 -52847
  187. package/farris.all.umd.cjs +9 -9
  188. package/index.css +1 -1
  189. package/package.json +1 -1
  190. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  191. package/types/checkbox/index.d.ts +1 -0
  192. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  193. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  194. package/types/common/entity/entity-schema.d.ts +258 -0
  195. package/types/component/src/component-ref.props.d.ts +4 -0
  196. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  197. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  198. package/types/data-grid/index.d.ts +5 -2
  199. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  200. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  201. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  202. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  203. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  204. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  205. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  206. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  207. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  208. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  209. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  210. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  211. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  212. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  213. package/types/data-view/composition/types.d.ts +19 -7
  214. package/types/data-view/composition/use-edit.d.ts +2 -1
  215. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  216. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  217. package/types/designer-canvas/src/types.d.ts +3 -3
  218. package/types/dynamic-form/index.d.ts +3 -1
  219. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  220. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  221. package/types/dynamic-form/src/types.d.ts +1 -1
  222. package/types/dynamic-resolver/index.d.ts +1 -0
  223. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  224. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  225. package/types/dynamic-resolver/src/types.d.ts +3 -2
  226. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  227. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
  228. package/types/modal/src/modal.props.d.ts +1 -4
  229. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
  230. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
  231. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  232. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  233. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  234. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  235. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  236. package/types/tabs/src/composition/types.d.ts +2 -2
  237. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  238. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  239. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  240. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  241. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  242. package/types/tags/index.d.ts +36 -5
  243. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  244. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  245. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  246. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
@@ -1,115 +1,107 @@
1
- import { defineComponent as F, ref as m, computed as B, createVNode as C, Teleport as I, createApp as ee, onUnmounted as te, inject as $, watch as j, nextTick as A, onMounted as V, withDirectives as ne, vShow as oe, Fragment as ae, mergeProps as G } from "vue";
2
- import { cloneDeep as ue } from "lodash-es";
3
- import { resolveAppearance as le } from "@farris/ui-vue/components/dynamic-resolver";
4
- import re from "@farris/ui-vue/components/tags";
5
- import ie from "@farris/ui-vue/components/popover";
6
- import { withInstall as se } from "@farris/ui-vue/components/common";
7
- const W = {}, _ = {};
8
- function L(e) {
9
- const { properties: t, title: o } = e, u = Object.keys(t).reduce((n, l) => (n[l] = t[l].type === "object" && t[l].properties ? L(t[l]) : ue(t[l].default), n), {});
10
- return u.id = `${o}-${Date.now()}`, u;
1
+ import { defineComponent as j, ref as y, computed as h, createVNode as v, Teleport as q, createApp as U, onUnmounted as _, inject as D, watch as R, nextTick as L, onMounted as F, withDirectives as X, vShow as z, Fragment as J, mergeProps as S } from "vue";
2
+ import { cloneDeep as Q } from "lodash-es";
3
+ import { resolveAppearance as Y } from "../dynamic-resolver/index.esm.js";
4
+ import Z from "../tags/index.esm.js";
5
+ import K from "../popover/index.esm.js";
6
+ import { useDesignerComponent as ee } from "../designer-canvas/index.esm.js";
7
+ import { withInstall as te } from "../common/index.esm.js";
8
+ const ne = {}, oe = {};
9
+ function A(e) {
10
+ const { properties: t, title: u, ignore: o } = e, n = o && Array.isArray(o), l = Object.keys(t).reduce((c, r) => ((!n || !o.find((b) => b == r)) && (c[r] = t[r].type === "object" && t[r].properties ? A(t[r]) : Q(t[r].default)), c), {});
11
+ return (!n || !o.find((c) => c == "id")) && (l.id = `${u}-${Date.now()}`), l;
11
12
  }
12
- function D(e, t = {}) {
13
- const o = W[e];
14
- if (o) {
15
- let u = L(o);
16
- const n = _[e];
17
- return u = n ? n({ getSchemaByType: D }, u, t) : u, u;
18
- }
19
- return null;
20
- }
21
- function ce(e, t) {
22
- const o = L(t);
23
- return Object.keys(e).reduce((u, n) => (u[n] = e[n], u), o), o;
13
+ function ue(e, t) {
14
+ const u = A(t);
15
+ return Object.keys(e).reduce((o, n) => (o[n] && typeof o[n] == "object" ? Object.assign(o[n], e[n]) : o[n] = e[n], o), u), u;
24
16
  }
25
- function pe(e, t) {
26
- return Object.keys(e).filter((u) => e[u] != null).reduce((u, n) => {
17
+ function ae(e, t) {
18
+ return Object.keys(e).filter((o) => e[o] != null).reduce((o, n) => {
27
19
  if (t.has(n)) {
28
20
  const l = t.get(n);
29
21
  if (typeof l == "string")
30
- u[l] = e[n];
22
+ o[l] = e[n];
31
23
  else {
32
24
  const c = l(n, e[n], e);
33
- Object.assign(u, c);
25
+ Object.assign(o, c);
34
26
  }
35
27
  } else
36
- u[n] = e[n];
37
- return u;
28
+ o[n] = e[n];
29
+ return o;
38
30
  }, {});
39
31
  }
40
- function fe(e, t, o = /* @__PURE__ */ new Map()) {
41
- const u = ce(e, t);
42
- return pe(u, o);
32
+ function le(e, t, u = /* @__PURE__ */ new Map()) {
33
+ const o = ue(e, t);
34
+ return ae(o, u);
43
35
  }
44
- function de(e = {}) {
45
- function t(a, i, r, f) {
46
- if (typeof r == "number")
47
- return f[a].length === r;
48
- if (typeof r == "object") {
49
- const d = Object.keys(r)[0], g = r[d];
50
- if (d === "not")
51
- return Number(f[a].length) !== Number(g);
52
- if (d === "moreThan")
53
- return Number(f[a].length) >= Number(g);
54
- if (d === "lessThan")
55
- return Number(f[a].length) <= Number(g);
36
+ function ie(e = {}) {
37
+ function t(a, s, i, p) {
38
+ if (typeof i == "number")
39
+ return p[a].length === i;
40
+ if (typeof i == "object") {
41
+ const f = Object.keys(i)[0], g = i[f];
42
+ if (f === "not")
43
+ return Number(p[a].length) !== Number(g);
44
+ if (f === "moreThan")
45
+ return Number(p[a].length) >= Number(g);
46
+ if (f === "lessThan")
47
+ return Number(p[a].length) <= Number(g);
56
48
  }
57
49
  return !1;
58
50
  }
59
- function o(a, i, r, f) {
60
- return f[a] && f[a].propertyValue && String(f[a].propertyValue.value) === String(r);
51
+ function u(a, s, i, p) {
52
+ return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(i);
61
53
  }
62
- const u = /* @__PURE__ */ new Map([
54
+ const o = /* @__PURE__ */ new Map([
63
55
  ["length", t],
64
- ["getProperty", o]
56
+ ["getProperty", u]
65
57
  ]);
66
- Object.keys(e).reduce((a, i) => (a.set(i, e[i]), a), u);
67
- function n(a, i) {
68
- const r = a;
69
- return typeof i == "number" ? [{ target: r, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: r, operator: "getProperty", param: a, value: !!i }] : typeof i == "object" ? Object.keys(i).map((f) => {
70
- if (f === "length")
71
- return { target: r, operator: "length", param: null, value: i[f] };
72
- const d = f, g = i[f];
73
- return { target: r, operator: "getProperty", param: d, value: g };
58
+ Object.keys(e).reduce((a, s) => (a.set(s, e[s]), a), o);
59
+ function n(a, s) {
60
+ const i = a;
61
+ return typeof s == "number" ? [{ target: i, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
62
+ if (p === "length")
63
+ return { target: i, operator: "length", param: null, value: s[p] };
64
+ const f = p, g = s[p];
65
+ return { target: i, operator: "getProperty", param: f, value: g };
74
66
  }) : [];
75
67
  }
76
68
  function l(a) {
77
- return Object.keys(a).reduce((r, f) => {
78
- const d = n(f, a[f]);
79
- return r.push(...d), r;
69
+ return Object.keys(a).reduce((i, p) => {
70
+ const f = n(p, a[p]);
71
+ return i.push(...f), i;
80
72
  }, []);
81
73
  }
82
- function c(a, i) {
83
- if (u.has(a.operator)) {
84
- const r = u.get(a.operator);
85
- return r && r(a.target, a.param, a.value, i) || !1;
74
+ function c(a, s) {
75
+ if (o.has(a.operator)) {
76
+ const i = o.get(a.operator);
77
+ return i && i(a.target, a.param, a.value, s) || !1;
86
78
  }
87
79
  return !1;
88
80
  }
89
- function s(a, i) {
90
- return l(a).reduce((d, g) => d && c(g, i), !0);
81
+ function r(a, s) {
82
+ return l(a).reduce((f, g) => f && c(g, s), !0);
91
83
  }
92
- function y(a, i) {
93
- const r = Object.keys(a), f = r.includes("allOf"), d = r.includes("anyOf"), g = f || d, k = (g ? a[g ? f ? "allOf" : "anyOf" : "allOf"] : [a]).map((M) => s(M, i));
94
- return f ? !k.includes(!1) : k.includes(!0);
84
+ function b(a, s) {
85
+ const i = Object.keys(a), p = i.includes("allOf"), f = i.includes("anyOf"), g = p || f, C = (g ? a[g ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((T) => r(T, s));
86
+ return p ? !C.includes(!1) : C.includes(!0);
95
87
  }
96
- return { parseValueSchema: y };
88
+ return { parseValueSchema: b };
97
89
  }
98
- const ye = {}, be = {};
99
- de();
100
- function me(e, t, o = /* @__PURE__ */ new Map(), u = (c, s, y) => s, n = {}, l = (c) => c) {
101
- return W[t.title] = t, _[t.title] = u, ye[t.title] = n, be[t.title] = l, (c = {}) => {
102
- const s = fe(c, t, o), y = Object.keys(e).reduce((a, i) => (a[i] = e[i].default, a), {});
103
- return Object.assign(y, s);
90
+ const re = {}, se = {};
91
+ ie();
92
+ function ce(e, t, u = /* @__PURE__ */ new Map(), o = (c, r, b) => r, n = {}, l = (c) => c) {
93
+ return ne[t.title] = t, oe[t.title] = o, re[t.title] = n, se[t.title] = l, (c = {}) => {
94
+ const r = le(c, t, u), b = Object.keys(e).reduce((a, s) => (a[s] = e[s].default, a), {});
95
+ return Object.assign(b, r);
104
96
  };
105
97
  }
106
- const ge = /* @__PURE__ */ new Map([
107
- ["appearance", le]
98
+ const de = /* @__PURE__ */ new Map([
99
+ ["appearance", Y]
108
100
  ]);
109
- function he(e, t, o) {
101
+ function pe(e, t, u) {
110
102
  return t;
111
103
  }
112
- const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-design.gitee.io/button-edit.schema.json", Ce = "button-edit", Te = "A Farris Input Component", Oe = "object", ke = {
104
+ const fe = "https://json-schema.org/draft/2020-12/schema", be = "https://farris-design.gitee.io/button-edit.schema.json", ge = "button-edit", ye = "A Farris Input Component", me = "object", ve = {
113
105
  id: {
114
106
  description: "The unique identifier for a Input Group",
115
107
  type: "string"
@@ -293,18 +285,18 @@ const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
293
285
  type: "string",
294
286
  default: ""
295
287
  }
296
- }, we = [
288
+ }, he = [
297
289
  "id",
298
290
  "type"
299
- ], Ee = {
300
- $schema: ve,
301
- $id: Be,
302
- title: Ce,
303
- description: Te,
304
- type: Oe,
305
- properties: ke,
306
- required: we
307
- }, Me = "buttonEdit", Pe = "A Farris Component", xe = "object", Se = {
291
+ ], Ce = {
292
+ $schema: fe,
293
+ $id: be,
294
+ title: ge,
295
+ description: ye,
296
+ type: me,
297
+ properties: ve,
298
+ required: he
299
+ }, Be = "buttonEdit", xe = "A Farris Component", Oe = "object", Te = {
308
300
  basic: {
309
301
  description: "Basic Infomation",
310
302
  title: "基本信息",
@@ -386,12 +378,12 @@ const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
386
378
  }
387
379
  }
388
380
  }
389
- }, Re = {
390
- title: Me,
391
- description: Pe,
392
- type: xe,
393
- categories: Se
394
- }, N = {
381
+ }, ke = {
382
+ title: Be,
383
+ description: xe,
384
+ type: Oe,
385
+ categories: Te
386
+ }, V = {
395
387
  /**
396
388
  * 组件标识
397
389
  */
@@ -497,79 +489,79 @@ const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
497
489
  * 打开前
498
490
  */
499
491
  beforeOpen: { type: Function, default: null }
500
- }, H = me(N, Ee, ge, he, Re), je = {
492
+ }, N = ce(V, Ce, de, pe, ke), we = {
501
493
  popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
502
494
  host: { type: Object },
503
495
  backgroundColor: { type: String, default: "" }
504
- }, De = /* @__PURE__ */ F({
496
+ }, Ee = /* @__PURE__ */ j({
505
497
  name: "FOverlay",
506
- props: je,
498
+ props: we,
507
499
  emits: ["click"],
508
500
  setup(e, t) {
509
- const o = m(e.popupContentPosition), u = m(e.host), n = B(() => ({
501
+ const u = y(e.popupContentPosition), o = y(e.host), n = h(() => ({
510
502
  backgroundColor: e.backgroundColor || "",
511
503
  pointerEvents: "auto"
512
504
  }));
513
- function l(s) {
514
- t.emit("click"), s.preventDefault(), s.stopPropagation();
505
+ function l(r) {
506
+ t.emit("click"), r.preventDefault(), r.stopPropagation();
515
507
  }
516
- B(() => {
517
- const s = u.value;
518
- if (s) {
519
- const y = s.getBoundingClientRect(), {
508
+ h(() => {
509
+ const r = o.value;
510
+ if (r) {
511
+ const b = r.getBoundingClientRect(), {
520
512
  left: a,
521
- top: i,
522
- height: r
523
- } = y;
513
+ top: s,
514
+ height: i
515
+ } = b;
524
516
  return {
525
517
  left: a,
526
- top: i + r
518
+ top: s + i
527
519
  };
528
520
  }
529
- return o.value;
521
+ return u.value;
530
522
  });
531
- const c = B(() => ({
523
+ const c = h(() => ({
532
524
  // position: 'relative',
533
525
  // left: `${position.value.left}px`,
534
526
  // top: `${position.value.top}px`
535
527
  }));
536
- return () => C(I, {
528
+ return () => v(q, {
537
529
  to: "body"
538
530
  }, {
539
531
  default: () => {
540
- var s, y;
541
- return [C("div", {
532
+ var r, b;
533
+ return [v("div", {
542
534
  class: "overlay-container",
543
535
  onClick: (a) => l(a),
544
536
  style: n.value
545
- }, [C("div", {
537
+ }, [v("div", {
546
538
  style: c.value
547
- }, [(y = (s = t.slots).default) == null ? void 0 : y.call(s)])])];
539
+ }, [(b = (r = t.slots).default) == null ? void 0 : b.call(r)])])];
548
540
  }
549
541
  });
550
542
  }
551
543
  });
552
- function Fe(e) {
544
+ function Pe(e) {
553
545
  if (e.content && e.content.render)
554
546
  return e.content.render;
555
547
  if (e.render && typeof e.render == "function")
556
548
  return e.render;
557
549
  }
558
- function Ve(e) {
550
+ function Me(e) {
559
551
  const t = document.createElement("div");
560
552
  t.style.display = "contents";
561
- let o;
562
- const u = e.onClickCallback || (() => {
553
+ let u;
554
+ const o = e.onClickCallback || (() => {
563
555
  }), n = () => {
564
- u(), o && o.unmount();
556
+ o(), u && u.unmount();
565
557
  };
566
- return o = ee({
558
+ return u = U({
567
559
  setup() {
568
- te(() => {
560
+ _(() => {
569
561
  document.body.removeChild(t);
570
562
  });
571
- const l = Fe(e);
572
- return () => C(De, {
563
+ const l = Pe(e);
564
+ return () => v(Ee, {
573
565
  "popup-content-position": e.popupPosition,
574
566
  host: e.host,
575
567
  onClick: n,
@@ -578,214 +570,214 @@ function Ve(e) {
578
570
  default: () => [l && l()]
579
571
  });
580
572
  }
581
- }), document.body.appendChild(t), o.mount(t), o;
573
+ }), document.body.appendChild(t), u.mount(t), u;
582
574
  }
583
- class Le {
575
+ class Ie {
584
576
  static show(t) {
585
- return Ve(t);
577
+ return Me(t);
586
578
  }
587
579
  }
588
- const Ne = Symbol("FModalService");
589
- function q(e, t) {
590
- function o() {
591
- const u = e.beforeOpen || e.beforeClickButton || null;
580
+ const je = Symbol("FModalService");
581
+ function G(e, t) {
582
+ function u() {
583
+ const o = e.beforeOpen || e.beforeClickButton || null;
592
584
  let n = Promise.resolve(!0);
593
- if (u) {
594
- const l = u(t.value);
585
+ if (o) {
586
+ const l = o(t.value);
595
587
  if (typeof l > "u")
596
588
  return n;
597
589
  typeof l == "boolean" ? n = Promise.resolve(l) : n = l;
598
590
  }
599
591
  return n;
600
592
  }
601
- return { judgeCanOpen: o };
593
+ return { judgeCanOpen: u };
602
594
  }
603
- function U(e, t, o, u, n) {
604
- const l = m(e.buttonBehavior), c = m(e.popupOnInput), s = B(() => ({
595
+ function $(e, t, u, o, n) {
596
+ const l = y(e.buttonBehavior), c = y(e.popupOnInput), r = h(() => ({
605
597
  "input-group-append": !0,
606
598
  "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
607
- })), { judgeCanOpen: y } = q(e, n), a = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), i = $(Ne, null), r = m();
608
- async function f(h) {
609
- if (await y() && a.value) {
610
- const O = !!t.slots.default;
599
+ })), { judgeCanOpen: b } = G(e, n), a = h(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), s = D(je, null), i = y();
600
+ async function p(m) {
601
+ if (await b() && a.value) {
602
+ const x = !!t.slots.default;
611
603
  if (l.value === "Modal") {
612
- const k = e.modalOptions, E = i == null ? void 0 : i.open({
613
- ...k,
604
+ const C = e.modalOptions, O = s == null ? void 0 : s.open({
605
+ ...C,
614
606
  render: () => t.slots.default && t.slots.default()
615
607
  });
616
- r.value = E == null ? void 0 : E.modalRef;
608
+ i.value = O == null ? void 0 : O.modalRef;
617
609
  }
618
- l.value === "Overlay" && Le.show({
610
+ l.value === "Overlay" && Ie.show({
619
611
  // host: buttonEditRef.value,
620
612
  host: document.body,
621
613
  backgroundColor: "rgba(0,0,0,.15)",
622
614
  render: () => t.slots.default && t.slots.default()
623
- }), O && l.value === "Popup" && u.togglePopup(!0), O && c.value && u.hidePopup(), t.emit("clickButton", { origin: h, value: e.modelValue });
615
+ }), x && l.value === "Popup" && o.togglePopup(!0), x && c.value && o.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
624
616
  }
625
617
  }
626
- function d(h) {
627
- t.emit("mouseEnterIcon", h);
618
+ function f(m) {
619
+ t.emit("mouseEnterIcon", m);
628
620
  }
629
- function g(h) {
630
- t.emit("mouseLeaveIcon", h);
621
+ function g(m) {
622
+ t.emit("mouseLeaveIcon", m);
631
623
  }
632
624
  return {
633
- buttonGroupClass: s,
634
- onClickButton: f,
635
- onMouseEnterButton: d,
625
+ buttonGroupClass: r,
626
+ onClickButton: p,
627
+ onMouseEnterButton: f,
636
628
  onMouseLeaveButton: g,
637
- modalRef: r
629
+ modalRef: i
638
630
  };
639
631
  }
640
- function X(e, t, o, u, n, l) {
641
- const c = m(!1), s = B(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: y } = l;
642
- function a(d) {
643
- c.value = d;
632
+ function Re(e, t, u, o, n, l) {
633
+ const c = y(!1), r = h(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: b } = l;
634
+ function a(f) {
635
+ c.value = f;
644
636
  }
645
- j(n, () => {
637
+ R(n, () => {
646
638
  a(!!n.value);
647
639
  });
648
- function i(d) {
649
- const g = !e.readonly && !e.disable && e.editable, h = !e.editable;
650
- d.stopPropagation(), (g || h) && (y("", !1), a(!c.value), t.emit("clear"));
640
+ function s(f) {
641
+ const g = !e.readonly && !e.disable && e.editable, m = !e.editable;
642
+ f.stopPropagation(), (g || m) && (b("", !1), a(!c.value), t.emit("clear"));
651
643
  }
652
- function r(d) {
653
- if (s.value) {
654
- if (!o.value) {
644
+ function i(f) {
645
+ if (r.value) {
646
+ if (!u.value) {
655
647
  a(!1);
656
648
  return;
657
649
  }
658
650
  !e.disable && !e.readonly && a(!0);
659
651
  }
660
652
  }
661
- function f(d) {
662
- s.value && a(!1);
653
+ function p(f) {
654
+ r.value && a(!1);
663
655
  }
664
656
  return {
665
- enableClearButton: s,
657
+ enableClearButton: r,
666
658
  showClearButton: c,
667
- onClearValue: i,
668
- onMouseEnterTextBox: r,
669
- onMouseLeaveTextBox: f
659
+ onClearValue: s,
660
+ onMouseEnterTextBox: i,
661
+ onMouseLeaveTextBox: p
670
662
  };
671
663
  }
672
- function z(e, t, o, u, n) {
673
- const l = B(() => e.popupOnInput), c = B(() => e.popupOnFocus), { shouldPopupContent: s } = n, y = B(() => e.enableTitle ? o.value : ""), a = B(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), i = B(() => e.readonly || !e.editable), r = m(!1), f = B(() => !e.disable && r.value), d = B(() => ({
664
+ function Fe(e, t, u, o, n) {
665
+ const l = h(() => e.popupOnInput), c = h(() => e.popupOnFocus), { shouldPopupContent: r } = n, b = h(() => e.enableTitle ? u.value : ""), a = h(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), s = h(() => e.readonly || !e.editable), i = y(!1), p = h(() => !e.disable && i.value), f = h(() => ({
674
666
  "text-left": e.textAlign === "left",
675
667
  "text-center": e.textAlign === "center",
676
668
  "text-right": e.textAlign === "right",
677
669
  "form-control": !0,
678
670
  "f-utils-fill": !0
679
- })), g = B(() => ({
671
+ })), g = h(() => ({
680
672
  "input-group": !0,
681
673
  "f-state-disable": e.disable,
682
674
  "f-state-editable": e.editable && !e.disable && !e.readonly,
683
675
  "f-state-readonly": e.readonly && !e.disable,
684
- "f-state-focus": f.value
676
+ "f-state-focus": p.value
685
677
  }));
686
- function h(p, w = !0) {
687
- o.value !== p && (o.value = p, w && t.emit("change", p), t.emit("update:modelValue", p));
678
+ function m(d, B = !0) {
679
+ u.value !== d && (u.value = d, B && t.emit("change", d), t.emit("update:modelValue", d));
688
680
  }
689
- function O(p) {
690
- s.value = !1, h(p, !0);
681
+ function x(d) {
682
+ r.value = !1, m(d, !0);
691
683
  }
692
- j(
684
+ R(
693
685
  () => e.modelValue,
694
- (p) => {
695
- o.value = p;
686
+ (d) => {
687
+ u.value = d;
696
688
  }
697
689
  );
698
- function k(p) {
699
- r.value = !1, t.emit("blur", p), p.stopPropagation();
690
+ function C(d) {
691
+ i.value = !1, t.emit("blur", d), d.stopPropagation();
700
692
  }
701
- function E(p) {
702
- t.emit("click", p);
693
+ function O(d) {
694
+ t.emit("click", d);
703
695
  }
704
- function M(p) {
705
- e.disable || (r.value = !0, i.value || (t.emit("focus", p), c.value && !s.value && n.popup()));
696
+ function T(d) {
697
+ e.disable || (i.value = !0, s.value || (t.emit("focus", d), c.value && !r.value && n.popup()));
706
698
  }
707
- function P(p) {
708
- t.emit("input", p.target.value);
709
- const w = p.target.value;
710
- u.value = w, o.value !== w && h(w, !0), l.value && !s.value && n.popup();
699
+ function k(d) {
700
+ t.emit("input", d.target.value);
701
+ const B = d.target.value;
702
+ o.value = B, u.value !== B && m(B, !0), l.value && !r.value && n.popup();
711
703
  }
712
- function x(p) {
713
- p.target.tagName !== "INPUT" && p.preventDefault(), p.stopPropagation();
704
+ function M(d) {
705
+ d.target.tagName !== "INPUT" && d.preventDefault(), d.stopPropagation();
714
706
  }
715
- function b(p) {
716
- t.emit("keydown", p);
707
+ function w(d) {
708
+ t.emit("keydown", d);
717
709
  }
718
- function T(p) {
719
- p.key === "Enter" && (l.value || c.value) && n.hidePopup(), t.emit("keyup", p);
710
+ function I(d) {
711
+ d.key === "Enter" && (l.value || c.value) && n.hidePopup(), t.emit("keyup", d);
720
712
  }
721
- function v(p) {
722
- const w = p.target.value;
723
- p.stopPropagation(), h(w);
713
+ function E(d) {
714
+ const B = d.target.value;
715
+ d.stopPropagation(), m(B);
724
716
  }
725
717
  return {
726
- hasFocusedTextBox: f,
727
- isTextBoxReadonly: i,
728
- textBoxClass: d,
718
+ hasFocusedTextBox: p,
719
+ isTextBoxReadonly: s,
720
+ textBoxClass: f,
729
721
  textBoxPlaceholder: a,
730
- textBoxTitle: y,
722
+ textBoxTitle: b,
731
723
  inputGroupClass: g,
732
- changeTextBoxValue: h,
733
- commitValue: O,
734
- onBlurTextBox: k,
735
- onClickTextBox: E,
736
- onFocusTextBox: M,
737
- onInput: P,
738
- onKeyDownTextBox: b,
739
- onKeyUpTextBox: T,
740
- onMouseDownTextBox: x,
741
- onTextBoxValueChange: v
724
+ changeTextBoxValue: m,
725
+ commitValue: x,
726
+ onBlurTextBox: C,
727
+ onClickTextBox: O,
728
+ onFocusTextBox: T,
729
+ onInput: k,
730
+ onKeyDownTextBox: w,
731
+ onKeyUpTextBox: I,
732
+ onMouseDownTextBox: M,
733
+ onTextBoxValueChange: E
742
734
  };
743
735
  }
744
- function J(e, t, o, u) {
745
- const n = m(), l = m(!1), { judgeCanOpen: c } = q(e, u);
746
- function s() {
747
- const r = n.value;
748
- r && r.show(o.value);
736
+ function W(e, t, u, o) {
737
+ const n = y(), l = y(!1), { judgeCanOpen: c } = G(e, o);
738
+ function r() {
739
+ const i = n.value;
740
+ i && i.show(u.value);
749
741
  }
750
- async function y(r = !1) {
742
+ async function b(i = !1) {
751
743
  if (!!t.slots.default) {
752
- if (!r && !l.value && !await c())
744
+ if (!i && !l.value && !await c())
753
745
  return;
754
- l.value = !l.value, await A(), s();
746
+ l.value = !l.value, await L(), r();
755
747
  }
756
748
  }
757
- async function a(r = !1) {
749
+ async function a(i = !1) {
758
750
  if (!!t.slots.default) {
759
- if (!r && !await c())
751
+ if (!i && !await c())
760
752
  return;
761
- l.value = !0, await A(), s();
753
+ l.value = !0, await L(), r();
762
754
  }
763
755
  }
764
- function i() {
756
+ function s() {
765
757
  l.value = !1;
766
758
  }
767
- return { hidePopup: i, popup: a, shouldPopupContent: l, togglePopup: y, popoverRef: n };
759
+ return { hidePopup: s, popup: a, shouldPopupContent: l, togglePopup: b, popoverRef: n };
768
760
  }
769
- function Q(e, t, o) {
770
- const u = m(), {
761
+ function Ve(e, t, u) {
762
+ const o = y(), {
771
763
  isTextBoxReadonly: n,
772
764
  textBoxClass: l,
773
765
  textBoxPlaceholder: c,
774
- textBoxTitle: s,
775
- onBlurTextBox: y,
766
+ textBoxTitle: r,
767
+ onBlurTextBox: b,
776
768
  onClickTextBox: a,
777
- onFocusTextBox: i,
778
- onInput: r,
779
- onKeyDownTextBox: f,
780
- onKeyUpTextBox: d,
769
+ onFocusTextBox: s,
770
+ onInput: i,
771
+ onKeyDownTextBox: p,
772
+ onKeyUpTextBox: f,
781
773
  onMouseDownTextBox: g,
782
- onTextBoxValueChange: h
783
- } = o;
784
- return V(() => {
785
- var O, k;
786
- e.selectOnCreated && ((O = u.value) == null || O.select()), e.focusOnCreated && ((k = u.value) == null || k.focus());
787
- }), () => C("input", {
788
- ref: u,
774
+ onTextBoxValueChange: m
775
+ } = u;
776
+ return F(() => {
777
+ var x, C;
778
+ e.selectOnCreated && ((x = o.value) == null || x.select()), e.focusOnCreated && ((C = o.value) == null || C.focus());
779
+ }), () => v("input", {
780
+ ref: o,
789
781
  name: "input-group-value",
790
782
  autocomplete: e.autoComplete ? "on" : "off",
791
783
  class: l.value,
@@ -795,30 +787,30 @@ function Q(e, t, o) {
795
787
  placeholder: c.value,
796
788
  readonly: n.value,
797
789
  tabindex: e.tabIndex,
798
- title: s.value,
790
+ title: r.value,
799
791
  type: e.inputType,
800
792
  value: t.value,
801
- onBlur: y,
802
- onChange: h,
793
+ onBlur: b,
794
+ onChange: m,
803
795
  onClick: a,
804
- onFocus: i,
805
- onInput: r,
806
- onKeydown: f,
807
- onKeyup: d,
796
+ onFocus: s,
797
+ onInput: i,
798
+ onKeydown: p,
799
+ onKeyup: f,
808
800
  onMousedown: g
809
801
  }, null);
810
802
  }
811
- function Y(e, t, o) {
812
- const u = m(e.separator), {
803
+ function Le(e, t, u) {
804
+ const o = y(e.separator), {
813
805
  changeTextBoxValue: n
814
- } = o, l = B(() => t.value ? t.value.split(u.value).map((s) => ({
815
- name: s,
806
+ } = u, l = h(() => t.value ? t.value.split(o.value).map((r) => ({
807
+ name: r,
816
808
  selectable: !0
817
809
  })) : []);
818
- function c(s) {
819
- n(s.map((y) => y.name).join(u.value), !0);
810
+ function c(r) {
811
+ n(r.map((b) => b.name).join(o.value), !0);
820
812
  }
821
- return () => C(re, {
813
+ return () => v(Z, {
822
814
  id: `${e.id}-tag-editor`,
823
815
  class: "form-control",
824
816
  data: l.value,
@@ -827,48 +819,48 @@ function Y(e, t, o) {
827
819
  onChange: c
828
820
  }, null);
829
821
  }
830
- function Z(e, t, o, u) {
822
+ function De(e, t, u, o) {
831
823
  const {
832
824
  buttonGroupClass: n,
833
825
  onClickButton: l,
834
826
  onMouseEnterButton: c,
835
- onMouseLeaveButton: s
836
- } = o, {
837
- enableClearButton: y,
827
+ onMouseLeaveButton: r
828
+ } = u, {
829
+ enableClearButton: b,
838
830
  showClearButton: a,
839
- onClearValue: i
840
- } = u, r = m();
831
+ onClearValue: s
832
+ } = o, i = y();
841
833
  return {
842
- renderButtonGroup: () => C("div", {
834
+ renderButtonGroup: () => v("div", {
843
835
  id: `${e.id}-button-group`,
844
836
  class: n.value
845
- }, [y.value && ne(C("span", {
837
+ }, [b.value && X(v("span", {
846
838
  class: "input-group-text input-group-clear",
847
- onClick: i
848
- }, [C("i", {
839
+ onClick: s
840
+ }, [v("i", {
849
841
  class: "f-icon modal_close"
850
- }, null)]), [[oe, a.value]]), t.slots.buttonContent ? C("span", {
842
+ }, null)]), [[z, a.value]]), t.slots.buttonContent ? v("span", {
851
843
  class: "input-group-text input-group-append-button",
852
844
  onClick: l,
853
845
  onMouseenter: c,
854
- onMouseleave: s
855
- }, [t.slots.buttonContent()]) : e.buttonContent ? C("span", {
846
+ onMouseleave: r
847
+ }, [t.slots.buttonContent()]) : e.buttonContent ? v("span", {
856
848
  class: "input-group-text input-group-append-button",
857
849
  innerHTML: e.buttonContent,
858
- ref: r,
850
+ ref: i,
859
851
  onClick: l,
860
852
  onMouseenter: c,
861
- onMouseleave: s
853
+ onMouseleave: r
862
854
  }, null) : null]),
863
- buttonHandleElement: r
855
+ buttonHandleElement: i
864
856
  };
865
857
  }
866
- function Ae(e, t, o) {
867
- const u = m(e.popupMinWidth), {
858
+ function Se(e, t, u) {
859
+ const o = y(e.popupMinWidth), {
868
860
  hidePopup: n,
869
861
  popoverRef: l
870
- } = o;
871
- return () => C(ie, {
862
+ } = u;
863
+ return () => v(K, {
872
864
  id: `${e.id}-popover`,
873
865
  ref: l,
874
866
  visible: !0,
@@ -877,212 +869,147 @@ function Ae(e, t, o) {
877
869
  "keep-width-with-reference": !0,
878
870
  fitContent: !0,
879
871
  "right-boundary": e.popupRightBoundary,
880
- minWidth: u.value,
872
+ minWidth: o.value,
881
873
  offsetX: e.popupOffsetX,
882
874
  onHidden: n
883
875
  }, {
884
876
  default: () => {
885
- var c, s;
886
- return [(s = (c = t.slots).default) == null ? void 0 : s.call(c)];
877
+ var c, r;
878
+ return [(r = (c = t.slots).default) == null ? void 0 : r.call(c)];
887
879
  }
888
880
  });
889
881
  }
890
- const R = /* @__PURE__ */ F({
882
+ const P = /* @__PURE__ */ j({
891
883
  name: "FButtonEdit",
892
- props: N,
884
+ props: V,
893
885
  emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
894
886
  setup(e, t) {
895
- const o = m(), u = m(e.customClass), n = m(e.modelValue), l = J(e, t, o, n), {
887
+ const u = y(), o = y(e.customClass), n = y(e.modelValue), l = W(e, t, u, n), {
896
888
  shouldPopupContent: c,
897
- hidePopup: s,
898
- togglePopup: y
899
- } = l, a = U(e, t, o, l, n), i = m(""), r = z(e, t, n, i, l), {
900
- hasFocusedTextBox: f,
901
- commitValue: d,
889
+ hidePopup: r,
890
+ togglePopup: b
891
+ } = l, a = $(e, t, u, l, n), s = y(""), i = Fe(e, t, n, s, l), {
892
+ hasFocusedTextBox: p,
893
+ commitValue: f,
902
894
  inputGroupClass: g
903
- } = r, h = X(e, t, n, f, i, r), {
904
- onMouseEnterTextBox: O,
905
- onMouseLeaveTextBox: k
906
- } = h, E = B(() => {
907
- const p = {
895
+ } = i, m = Re(e, t, n, p, s, i), {
896
+ onMouseEnterTextBox: x,
897
+ onMouseLeaveTextBox: C
898
+ } = m, O = h(() => {
899
+ const d = {
908
900
  "f-button-edit": !0,
909
901
  "f-cmp-inputgroup": !0,
910
902
  "f-button-edit-nowrap": !e.wrapText
911
903
  };
912
- return u.value && u.value.split(" ").reduce((w, S) => (w[S] = !0, w), p), p;
904
+ return o.value && o.value.split(" ").reduce((B, H) => (B[H] = !0, B), d), d;
913
905
  });
914
- function M() {
915
- return e.multiSelect && e.inputType === "tag" ? Y(e, n, r) : Q(e, n, r);
906
+ function T() {
907
+ return e.multiSelect && e.inputType === "tag" ? Le(e, n, i) : Ve(e, n, i);
916
908
  }
917
- let P = M();
918
- j([() => e.multiSelect, () => e.inputType], () => {
919
- P = M();
909
+ let k = T();
910
+ R([() => e.multiSelect, () => e.inputType], () => {
911
+ k = T();
920
912
  });
921
913
  const {
922
- renderButtonGroup: x,
923
- buttonHandleElement: b
924
- } = Z(e, t, a, h), T = Ae(e, t, l), v = {
925
- commitValue: d,
926
- elementRef: o,
927
- hidePopup: s,
914
+ renderButtonGroup: M,
915
+ buttonHandleElement: w
916
+ } = De(e, t, a, m), I = Se(e, t, l), E = {
917
+ commitValue: f,
918
+ elementRef: u,
919
+ hidePopup: r,
928
920
  shouldPopupContent: c,
929
- togglePopup: y,
921
+ togglePopup: b,
930
922
  openDialog: () => {
931
- b.value && e.buttonBehavior === "Modal" && b.value.click();
923
+ w.value && e.buttonBehavior === "Modal" && w.value.click();
932
924
  },
933
925
  getModal: () => {
934
- var p;
935
- return e.buttonBehavior === "Modal" ? (p = a.modalRef.value) == null ? void 0 : p.value : null;
926
+ var d;
927
+ return e.buttonBehavior === "Modal" ? (d = a.modalRef.value) == null ? void 0 : d.value : null;
936
928
  }
937
929
  };
938
- return V(() => {
939
- o.value.componentInstance = v, window.onresize = () => {
930
+ return F(() => {
931
+ u.value.componentInstance = E, window.onresize = () => {
940
932
  document.body.click();
941
933
  };
942
- }), t.expose(v), () => C(ae, null, [C("div", G(t.attrs, {
943
- ref: o,
944
- class: E.value,
934
+ }), t.expose(E), () => v(J, null, [v("div", S(t.attrs, {
935
+ ref: u,
936
+ class: O.value,
945
937
  id: e.id
946
- }), [C("div", {
938
+ }), [v("div", {
947
939
  id: `${e.id}-input-group`,
948
940
  class: g.value,
949
- onMouseenter: O,
950
- onMouseleave: k
951
- }, [P(), x()])]), c.value && T()]);
941
+ onMouseenter: x,
942
+ onMouseleave: C
943
+ }, [k(), M()])]), c.value && I()]);
952
944
  }
953
945
  });
954
- function $e(e, t, o) {
955
- var x;
956
- function u() {
957
- }
958
- const n = "", l = "", c = m();
959
- function s() {
960
- return (t == null ? void 0 : t.schema.componentType) !== "frame";
961
- }
962
- function y() {
963
- return !1;
964
- }
965
- function a() {
966
- return (t == null ? void 0 : t.schema.componentType) !== "frame";
967
- }
968
- function i() {
969
- return (t == null ? void 0 : t.schema.componentType) === "frame";
970
- }
971
- function r(b) {
972
- if (!b || !b.value)
973
- return null;
974
- if (b.value.schema && b.value.schema.type === "component")
975
- return b.value;
976
- const T = m(b == null ? void 0 : b.value.parent), v = r(T);
977
- return v || null;
978
- }
979
- function f(b = t) {
980
- const { componentInstance: T, designerItemElementRef: v } = b;
981
- return !T || !T.value ? null : T.value.canMove ? v : f(b.parent);
982
- }
983
- function d(b) {
984
- return !!o;
985
- }
986
- function g() {
987
- return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
988
- }
989
- function h() {
990
- }
991
- function O(b, T) {
992
- }
993
- function k(b) {
994
- const { componentType: T } = b;
995
- let v = D(T, b);
996
- const p = T.toLowerCase().replace("-", "_");
997
- return v && !v.id && v.type === T && (v.id = `${p}_${Math.random().toString().slice(2, 6)}`), v;
998
- }
999
- function E(b, T) {
1000
- const v = String(b.getAttribute("data-controltype")), p = b.getAttribute("data-feature"), w = p ? JSON.parse(p) : {};
1001
- w.parentComponentInstance = c.value;
1002
- let S = D(v, w);
1003
- const K = v.toLowerCase().replace("-", "_");
1004
- return S && !S.id && S.type === v && (S.id = `${K}_${Math.random().toString().slice(2, 6)}`), S;
1005
- }
1006
- function M(b) {
1007
- }
1008
- function P(...b) {
1009
- }
1010
- return c.value = {
1011
- canMove: s(),
1012
- canSelectParent: y(),
1013
- canDelete: a(),
1014
- canNested: !i(),
1015
- contents: t == null ? void 0 : t.schema.contents,
1016
- elementRef: e,
1017
- parent: (x = t == null ? void 0 : t.parent) == null ? void 0 : x.componentInstance,
1018
- schema: t == null ? void 0 : t.schema,
1019
- styles: n,
1020
- designerClass: l,
1021
- canAccepts: d,
1022
- getBelongedComponentInstance: r,
1023
- getDraggableDesignItemElement: f,
1024
- getDraggingDisplayText: g,
1025
- getPropConfig: P,
1026
- getDragScopeElement: h,
1027
- onAcceptMovedChildElement: O,
1028
- onAcceptNewChildElement: E,
1029
- onChildElementMovedOut: M,
1030
- addNewChildComponentSchema: k,
1031
- updateDragAndDropRules: u,
1032
- triggerBelongedComponentToMoveWhenMoved: m(!1),
1033
- triggerBelongedComponentToDeleteWhenDeleted: m(!1)
1034
- }, c;
946
+ function Ae(e, t, u) {
947
+ const {
948
+ buttonGroupClass: o
949
+ } = u, n = y();
950
+ return {
951
+ renderButtonGroup: () => v("div", {
952
+ id: `${e.id}-button-group`,
953
+ class: o.value
954
+ }, [t.slots.buttonContent ? v("span", {
955
+ class: "input-group-text input-group-append-button"
956
+ }, [t.slots.buttonContent()]) : e.buttonContent ? v("span", {
957
+ class: "input-group-text input-group-append-button",
958
+ innerHTML: e.buttonContent,
959
+ ref: n
960
+ }, null) : null]),
961
+ buttonHandleElement: n
962
+ };
1035
963
  }
1036
- const Ge = /* @__PURE__ */ F({
964
+ const Ne = /* @__PURE__ */ j({
1037
965
  name: "FButtonEdit",
1038
- props: N,
966
+ props: V,
1039
967
  emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
1040
968
  setup(e, t) {
1041
- const o = m(), u = $("design-item-context"), n = $e(o, u), l = m(e.customClass), c = m(e.modelValue), s = J(e, t, o, c), y = U(e, t, o, s, c), a = m(""), i = z(e, t, c, a, s), {
1042
- hasFocusedTextBox: r,
1043
- inputGroupClass: f
1044
- } = i, d = X(e, t, c, r, a, i);
1045
- V(() => {
1046
- o.value.componentInstance = n;
969
+ const u = y(), o = D("design-item-context"), n = ee(u, o), l = y(e.customClass), c = y(e.modelValue), r = W(e, t, u, c), b = $(e, t, u, r, c), a = y(), s = h(() => ({
970
+ "f-cmp-inputgroup": !0,
971
+ "input-group": !0,
972
+ "f-state-disable": !0,
973
+ "f-state-editable": !1,
974
+ "f-state-readonly": !0
975
+ }));
976
+ F(() => {
977
+ u.value.componentInstance = n;
1047
978
  }), t.expose(n.value);
1048
- const g = B(() => {
1049
- const M = {
979
+ const i = h(() => {
980
+ const f = {
1050
981
  "f-button-edit": !0,
1051
982
  "f-cmp-inputgroup": !0,
1052
983
  "f-button-edit-nowrap": !e.wrapText
1053
984
  };
1054
- return l.value && l.value.split(" ").reduce((P, x) => (P[x] = !0, P), M), M;
1055
- });
1056
- function h() {
1057
- return e.multiSelect && e.inputType === "tag" ? Y(e, c, i) : Q(e, c, i);
1058
- }
1059
- let O = h();
1060
- j([() => e.multiSelect, () => e.inputType], () => {
1061
- O = h();
1062
- });
1063
- const {
1064
- renderButtonGroup: k,
1065
- buttonHandleElement: E
1066
- } = Z(e, t, y, d);
1067
- return () => C("div", G(t.attrs, {
1068
- ref: o,
1069
- class: g.value,
985
+ return l.value && l.value.split(" ").reduce((g, m) => (g[m] = !0, g), f), f;
986
+ }), {
987
+ renderButtonGroup: p
988
+ } = Ae(e, t, b);
989
+ return () => v("div", S(t.attrs, {
990
+ ref: u,
991
+ class: i.value,
1070
992
  id: e.id
1071
- }), [C("div", {
1072
- class: f.value
1073
- }, [O(), k()])]);
993
+ }), [v("div", {
994
+ class: s.value
995
+ }, [v("input", {
996
+ ref: a,
997
+ class: "form-control",
998
+ readonly: !0,
999
+ placeholder: e.placeholder
1000
+ }, null), p()])]);
1074
1001
  }
1075
1002
  });
1076
- R.register = (e, t, o, u) => {
1077
- e["button-edit"] = R, t["button-edit"] = H;
1003
+ P.register = (e, t, u, o) => {
1004
+ e["button-edit"] = P, t["button-edit"] = N;
1078
1005
  };
1079
- R.registerDesigner = (e, t, o) => {
1080
- e["button-edit"] = Ge, t["button-edit"] = H;
1006
+ P.registerDesigner = (e, t, u) => {
1007
+ e["button-edit"] = Ne, t["button-edit"] = N;
1081
1008
  };
1082
- const ze = se(R);
1009
+ const Xe = te(P);
1083
1010
  export {
1084
- R as FButtonEdit,
1085
- N as buttonEditProps,
1086
- ze as default,
1087
- H as propsResolver
1011
+ P as FButtonEdit,
1012
+ V as buttonEditProps,
1013
+ Xe as default,
1014
+ N as propsResolver
1088
1015
  };