@farris/ui-vue 1.6.5-beta.7 → 1.6.5

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 (192) hide show
  1. package/components/accordion/index.esm.js +65 -65
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +360 -361
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +524 -520
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +134 -134
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +192 -192
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/code-editor/index.esm.js +8 -8
  12. package/components/code-editor/index.umd.cjs +3 -3
  13. package/components/collection-property-editor/index.esm.js +72 -72
  14. package/components/collection-property-editor/index.umd.cjs +1 -1
  15. package/components/color-picker/index.esm.js +291 -289
  16. package/components/color-picker/index.umd.cjs +1 -1
  17. package/components/combo-list/index.esm.js +190 -181
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +113 -112
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +3 -1
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +309 -309
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.esm.js +1125 -1124
  26. package/components/condition/index.umd.cjs +1 -1
  27. package/components/content-container/index.esm.js +472 -472
  28. package/components/content-container/index.umd.cjs +1 -1
  29. package/components/data-grid/index.esm.js +99 -99
  30. package/components/data-grid/index.umd.cjs +1 -1
  31. package/components/data-view/index.esm.js +3387 -3321
  32. package/components/data-view/index.umd.cjs +1 -1
  33. package/components/date-picker/index.esm.js +1604 -1601
  34. package/components/date-picker/index.umd.cjs +1 -1
  35. package/components/designer-canvas/index.esm.js +1082 -1079
  36. package/components/designer-canvas/index.umd.cjs +1 -1
  37. package/components/discussion-editor/index.esm.js +973 -1040
  38. package/components/discussion-editor/index.umd.cjs +6 -6
  39. package/components/dropdown/index.esm.js +335 -330
  40. package/components/dropdown/index.umd.cjs +2 -2
  41. package/components/dynamic-form/index.esm.js +177 -177
  42. package/components/dynamic-form/index.umd.cjs +1 -1
  43. package/components/dynamic-resolver/index.esm.js +6 -6
  44. package/components/dynamic-resolver/index.umd.cjs +1 -1
  45. package/components/dynamic-view/index.esm.js +344 -344
  46. package/components/dynamic-view/index.umd.cjs +1 -1
  47. package/components/events-editor/index.esm.js +644 -644
  48. package/components/events-editor/index.umd.cjs +3 -3
  49. package/components/expression-editor/index.esm.js +1773 -1760
  50. package/components/expression-editor/index.umd.cjs +4 -4
  51. package/components/fieldset/index.esm.js +55 -55
  52. package/components/fieldset/index.umd.cjs +1 -1
  53. package/components/filter-bar/index.esm.js +879 -869
  54. package/components/filter-bar/index.umd.cjs +1 -1
  55. package/components/filter-condition-editor/index.esm.js +1091 -1077
  56. package/components/filter-condition-editor/index.umd.cjs +3 -3
  57. package/components/flow-canvas/index.esm.js +215 -215
  58. package/components/flow-canvas/index.umd.cjs +1 -1
  59. package/components/html-template/index.esm.js +164 -164
  60. package/components/html-template/index.umd.cjs +1 -1
  61. package/components/image-cropper/index.esm.js +198 -198
  62. package/components/image-cropper/index.umd.cjs +1 -1
  63. package/components/json-editor/index.esm.js +64 -64
  64. package/components/json-editor/index.umd.cjs +1 -1
  65. package/components/language-textbox/index.esm.js +140 -140
  66. package/components/language-textbox/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +111 -111
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +90 -90
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.esm.js +139 -141
  72. package/components/list-view/index.umd.cjs +3 -3
  73. package/components/locale/index.esm.js +833 -901
  74. package/components/locale/index.umd.cjs +6 -6
  75. package/components/lookup/index.esm.js +1352 -1351
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.esm.js +1387 -1383
  78. package/components/mapping-editor/index.umd.cjs +1 -1
  79. package/components/menu-lookup/index.esm.js +1059 -1127
  80. package/components/menu-lookup/index.umd.cjs +6 -6
  81. package/components/message-box/index.esm.js +217 -217
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.esm.js +283 -283
  84. package/components/modal/index.umd.cjs +1 -1
  85. package/components/nav/index.esm.js +106 -106
  86. package/components/nav/index.umd.cjs +1 -1
  87. package/components/number-range/index.esm.js +194 -194
  88. package/components/number-range/index.umd.cjs +1 -1
  89. package/components/number-spinner/index.esm.js +463 -462
  90. package/components/number-spinner/index.umd.cjs +1 -1
  91. package/components/order/index.esm.js +883 -876
  92. package/components/order/index.umd.cjs +4 -4
  93. package/components/page-footer/index.esm.js +94 -94
  94. package/components/page-footer/index.umd.cjs +1 -1
  95. package/components/page-header/index.esm.js +942 -939
  96. package/components/page-header/index.umd.cjs +1 -1
  97. package/components/pagination/index.esm.js +82 -82
  98. package/components/pagination/index.umd.cjs +1 -1
  99. package/components/popover/index.esm.js +59 -57
  100. package/components/popover/index.umd.cjs +1 -1
  101. package/components/progress/index.esm.js +113 -113
  102. package/components/progress/index.umd.cjs +2 -2
  103. package/components/property-editor/index.esm.js +151 -150
  104. package/components/property-editor/index.umd.cjs +1 -1
  105. package/components/property-panel/index.esm.js +739 -739
  106. package/components/property-panel/index.umd.cjs +2 -2
  107. package/components/query-solution/index.esm.js +4142 -4190
  108. package/components/query-solution/index.umd.cjs +6 -6
  109. package/components/radio-button/index.esm.js +182 -182
  110. package/components/radio-button/index.umd.cjs +1 -1
  111. package/components/rate/index.esm.js +106 -106
  112. package/components/rate/index.umd.cjs +1 -1
  113. package/components/response-layout/index.esm.js +535 -535
  114. package/components/response-layout/index.umd.cjs +1 -1
  115. package/components/response-layout-editor/index.esm.js +1456 -1443
  116. package/components/response-layout-editor/index.umd.cjs +1 -1
  117. package/components/response-toolbar/index.esm.js +779 -776
  118. package/components/response-toolbar/index.umd.cjs +1 -1
  119. package/components/schema-selector/index.esm.js +1875 -1866
  120. package/components/schema-selector/index.umd.cjs +7 -7
  121. package/components/search-box/index.esm.js +151 -147
  122. package/components/search-box/index.umd.cjs +1 -1
  123. package/components/section/index.esm.js +1236 -1233
  124. package/components/section/index.umd.cjs +1 -1
  125. package/components/smoke-detector/index.esm.js +163 -163
  126. package/components/smoke-detector/index.umd.cjs +1 -1
  127. package/components/sort-condition-editor/index.esm.js +1097 -1083
  128. package/components/sort-condition-editor/index.umd.cjs +3 -3
  129. package/components/splitter/index.esm.js +3 -3
  130. package/components/splitter/index.umd.cjs +1 -1
  131. package/components/step/index.esm.js +133 -133
  132. package/components/step/index.umd.cjs +1 -1
  133. package/components/switch/index.esm.js +103 -98
  134. package/components/switch/index.umd.cjs +1 -1
  135. package/components/tabs/index.esm.js +1596 -1593
  136. package/components/tabs/index.umd.cjs +2 -2
  137. package/components/tags/index.esm.js +93 -93
  138. package/components/tags/index.umd.cjs +1 -1
  139. package/components/text/index.esm.js +138 -138
  140. package/components/text/index.umd.cjs +1 -1
  141. package/components/textarea/index.esm.js +684 -684
  142. package/components/textarea/index.umd.cjs +2 -2
  143. package/components/time-picker/index.esm.js +935 -929
  144. package/components/time-picker/index.umd.cjs +1 -1
  145. package/components/tooltip/index.esm.js +173 -171
  146. package/components/tooltip/index.umd.cjs +1 -1
  147. package/components/transfer/index.esm.js +190 -192
  148. package/components/transfer/index.umd.cjs +4 -4
  149. package/components/tree-grid/index.esm.js +124 -124
  150. package/components/tree-grid/index.umd.cjs +1 -1
  151. package/components/tree-view/index.esm.js +2363 -2278
  152. package/components/tree-view/index.umd.cjs +1 -1
  153. package/components/uploader/index.esm.js +170 -170
  154. package/components/uploader/index.umd.cjs +2 -2
  155. package/components/verify-detail/index.esm.js +196 -196
  156. package/components/verify-detail/index.umd.cjs +1 -1
  157. package/components/video/index.esm.js +227 -227
  158. package/components/video/index.umd.cjs +1 -1
  159. package/components/weather/index.esm.js +9 -9
  160. package/components/weather/index.umd.cjs +2 -2
  161. package/designer/button-edit/index.esm.js +353 -353
  162. package/designer/button-edit/index.umd.cjs +1 -1
  163. package/designer/checkbox/index.esm.js +7 -3
  164. package/designer/checkbox/index.umd.cjs +1 -1
  165. package/designer/checkbox-group/index.esm.js +38 -33
  166. package/designer/checkbox-group/index.umd.cjs +1 -1
  167. package/designer/data-grid/index.esm.js +3562 -3536
  168. package/designer/data-grid/index.umd.cjs +6 -6
  169. package/designer/data-view/index.esm.js +3 -3
  170. package/designer/data-view/index.umd.cjs +3 -3
  171. package/designer/farris-designer.all.esm.js +4203 -4193
  172. package/designer/farris-designer.all.umd.cjs +9 -9
  173. package/designer/input-group/index.esm.js +97 -97
  174. package/designer/input-group/index.umd.cjs +1 -1
  175. package/designer/list-view/index.esm.js +1868 -1854
  176. package/designer/list-view/index.umd.cjs +8 -8
  177. package/designer/radio-group/index.esm.js +954 -949
  178. package/designer/radio-group/index.umd.cjs +1 -1
  179. package/farris.all.esm.js +16195 -16126
  180. package/farris.all.umd.cjs +30 -30
  181. package/locales/data-grid/ui/en.json +2 -2
  182. package/locales/designer/en.json +7 -6
  183. package/locales/designer/zh-CHS.json +2 -1
  184. package/locales/designer/zh-CHT.json +2 -1
  185. package/locales/ui/en.json +7 -6
  186. package/locales/ui/zh-CHS.json +2 -1
  187. package/locales/ui/zh-CHT.json +2 -1
  188. package/package.json +1 -1
  189. package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
  190. package/types/data-view/composition/types.d.ts +10 -4
  191. package/types/lookup/src/composition/use-dialog.d.ts +2 -0
  192. package/types/lookup/src/composition/use-input-change.d.ts +1 -0
@@ -1,25 +1,25 @@
1
- import { ref as j, computed as ve, onMounted as G, defineComponent as U, createVNode as O, withDirectives as _, vShow as X, Teleport as be, Fragment as V, inject as ge } from "vue";
2
- import { isPlainObject as J, cloneDeep as Q } from "lodash-es";
1
+ import { ref as j, computed as ve, onMounted as G, defineComponent as U, createVNode as O, withDirectives as _, vShow as X, Teleport as ge, Fragment as V, inject as be } from "vue";
2
+ import { cloneDeep as Z, isPlainObject as J } from "lodash-es";
3
3
  import { getSchemaByTypeForDesigner as ye } from "../dynamic-resolver/index.esm.js";
4
4
  function I(e, t) {
5
5
  let n;
6
- function i(o) {
7
- const { properties: l, title: v, ignore: r } = o, a = r && Array.isArray(r), u = Object.keys(l).reduce((w, f) => ((!a || !r.find((s) => s === f)) && (w[f] = l[f].type === "object" && l[f].properties ? i(l[f]) : Q(l[f].default)), w), {});
8
- if (v && (!a || !r.find((w) => w === "id"))) {
9
- const w = v.toLowerCase().replace(/-/g, "_");
10
- u.id = `${w}_${Math.random().toString().slice(2, 6)}`;
6
+ function a(o) {
7
+ const { properties: l, title: v, ignore: r } = o, i = r && Array.isArray(r), c = Object.keys(l).reduce((y, f) => ((!i || !r.find((s) => s === f)) && (y[f] = l[f].type === "object" && l[f].properties ? a(l[f]) : Z(l[f].default)), y), {});
8
+ if (v && (!i || !r.find((y) => y === "id"))) {
9
+ const y = v.toLowerCase().replace(/-/g, "_");
10
+ c.id = `${y}_${Math.random().toString().slice(2, 6)}`;
11
11
  }
12
- return u;
12
+ return c;
13
13
  }
14
14
  function S(o) {
15
15
  const { properties: l, title: v, required: r } = o;
16
16
  if (r && Array.isArray(r)) {
17
- const a = r.reduce((u, w) => (u[w] = l[w].type === "object" && l[w].properties ? i(l[w]) : Q(l[w].default), u), {});
18
- if (v && r.find((u) => u === "id")) {
19
- const u = v.toLowerCase().replace(/-/g, "_");
20
- a.id = `${u}_${Math.random().toString().slice(2, 6)}`;
17
+ const i = r.reduce((c, y) => (c[y] = l[y].type === "object" && l[y].properties ? a(l[y]) : Z(l[y].default), c), {});
18
+ if (v && r.find((c) => c === "id")) {
19
+ const c = v.toLowerCase().replace(/-/g, "_");
20
+ i.id = `${c}_${Math.random().toString().slice(2, 6)}`;
21
21
  }
22
- return a;
22
+ return i;
23
23
  }
24
24
  return {
25
25
  type: v
@@ -28,34 +28,34 @@ function I(e, t) {
28
28
  function k(o, l = {}, v) {
29
29
  const r = e[o];
30
30
  if (r) {
31
- let a = S(r);
32
- const u = t[o];
33
- return a = u ? u({ getSchemaByType: k }, a, l, v) : a, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(a), a;
31
+ let i = S(r);
32
+ const c = t[o];
33
+ return i = c ? c({ getSchemaByType: k }, i, l, v) : i, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(i), i;
34
34
  }
35
35
  return null;
36
36
  }
37
- function D(o, l) {
38
- const v = i(l);
39
- return Object.keys(v).reduce((r, a) => (Object.prototype.hasOwnProperty.call(o, a) && (r[a] && J(r[a]) && J(o[a] || !o[a]) ? Object.assign(r[a], o[a] || {}) : r[a] = o[a]), r), v), v;
37
+ function B(o, l) {
38
+ const v = a(l);
39
+ return Object.keys(v).reduce((r, i) => (Object.prototype.hasOwnProperty.call(o, i) && (r[i] && J(r[i]) && J(o[i] || !o[i]) ? Object.assign(r[i], o[i] || {}) : r[i] = o[i]), r), v), v;
40
40
  }
41
- function T(o, l) {
42
- return Object.keys(o).filter((r) => o[r] != null).reduce((r, a) => {
43
- if (l.has(a)) {
44
- const u = l.get(a);
45
- if (typeof u == "string")
46
- r[u] = o[a];
41
+ function F(o, l) {
42
+ return Object.keys(o).filter((r) => o[r] != null).reduce((r, i) => {
43
+ if (l.has(i)) {
44
+ const c = l.get(i);
45
+ if (typeof c == "string")
46
+ r[c] = o[i];
47
47
  else {
48
- const w = u(a, o[a], o);
49
- Object.assign(r, w);
48
+ const y = c(i, o[i], o);
49
+ Object.assign(r, y);
50
50
  }
51
51
  } else
52
- r[a] = o[a];
52
+ r[i] = o[i];
53
53
  return r;
54
54
  }, {});
55
55
  }
56
- function $(o, l, v = /* @__PURE__ */ new Map()) {
57
- const r = D(o, l);
58
- return T(r, v);
56
+ function R(o, l, v = /* @__PURE__ */ new Map()) {
57
+ const r = B(o, l);
58
+ return F(r, v);
59
59
  }
60
60
  function d(o) {
61
61
  var v;
@@ -64,23 +64,23 @@ function I(e, t) {
64
64
  const r = e[l];
65
65
  if (!r)
66
66
  return o;
67
- const a = D(o, r), u = ((v = o.editor) == null ? void 0 : v.type) || "";
68
- if (u) {
69
- const w = e[u], f = D(o.editor, w);
70
- a.editor = f;
67
+ const i = B(o, r), c = ((v = o.editor) == null ? void 0 : v.type) || "";
68
+ if (c) {
69
+ const y = e[c], f = B(o.editor, y);
70
+ i.editor = f;
71
71
  }
72
- return a;
72
+ return i;
73
73
  }
74
74
  return o;
75
75
  }
76
- function b(o) {
76
+ function g(o) {
77
77
  n = o;
78
78
  }
79
- return { getSchemaByType: k, resolveSchemaWithDefaultValue: d, resolveSchemaToProps: $, mappingSchemaToProps: T, setDesignerContext: b };
79
+ return { getSchemaByType: k, resolveSchemaWithDefaultValue: d, resolveSchemaToProps: R, mappingSchemaToProps: F, setDesignerContext: g };
80
80
  }
81
- const K = {}, ee = {}, { resolveSchemaWithDefaultValue: we, resolveSchemaToProps: he, mappingSchemaToProps: Se } = I(K, ee);
81
+ const K = {}, ee = {}, { getSchemaByType: mt, resolveSchemaWithDefaultValue: we, resolveSchemaToProps: he, mappingSchemaToProps: Se, setDesignerContext: vt } = I(K, ee);
82
82
  function Te(e = {}) {
83
- function t(d, b, o, l) {
83
+ function t(d, g, o, l) {
84
84
  if (typeof o == "number")
85
85
  return l[d].length === o;
86
86
  if (typeof o == "object") {
@@ -94,20 +94,20 @@ function Te(e = {}) {
94
94
  }
95
95
  return !1;
96
96
  }
97
- function n(d, b, o, l) {
97
+ function n(d, g, o, l) {
98
98
  return l[d] && l[d].propertyValue && String(l[d].propertyValue.value) === String(o);
99
99
  }
100
- const i = /* @__PURE__ */ new Map([
100
+ const a = /* @__PURE__ */ new Map([
101
101
  ["length", t],
102
102
  ["getProperty", n]
103
103
  ]);
104
- Object.keys(e).reduce((d, b) => (d.set(b, e[b]), d), i);
105
- function S(d, b) {
104
+ Object.keys(e).reduce((d, g) => (d.set(g, e[g]), d), a);
105
+ function S(d, g) {
106
106
  const o = d;
107
- return typeof b == "number" ? [{ target: o, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: o, operator: "getProperty", param: d, value: !!b }] : typeof b == "object" ? Object.keys(b).map((l) => {
107
+ return typeof g == "number" ? [{ target: o, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: o, operator: "getProperty", param: d, value: !!g }] : typeof g == "object" ? Object.keys(g).map((l) => {
108
108
  if (l === "length")
109
- return { target: o, operator: "length", param: null, value: b[l] };
110
- const v = l, r = b[l];
109
+ return { target: o, operator: "length", param: null, value: g[l] };
110
+ const v = l, r = g[l];
111
111
  return { target: o, operator: "getProperty", param: v, value: r };
112
112
  }) : [];
113
113
  }
@@ -117,31 +117,31 @@ function Te(e = {}) {
117
117
  return o.push(...v), o;
118
118
  }, []);
119
119
  }
120
- function D(d, b) {
121
- if (i.has(d.operator)) {
122
- const o = i.get(d.operator);
123
- return o && o(d.target, d.param, d.value, b) || !1;
120
+ function B(d, g) {
121
+ if (a.has(d.operator)) {
122
+ const o = a.get(d.operator);
123
+ return o && o(d.target, d.param, d.value, g) || !1;
124
124
  }
125
125
  return !1;
126
126
  }
127
- function T(d, b) {
128
- return k(d).reduce((v, r) => v && D(r, b), !0);
127
+ function F(d, g) {
128
+ return k(d).reduce((v, r) => v && B(r, g), !0);
129
129
  }
130
- function $(d, b) {
131
- const o = Object.keys(d), l = o.includes("allOf"), v = o.includes("anyOf"), r = l || v, w = (r ? d[r ? l ? "allOf" : "anyOf" : "allOf"] : [d]).map((s) => T(s, b));
132
- return l ? !w.includes(!1) : w.includes(!0);
130
+ function R(d, g) {
131
+ const o = Object.keys(d), l = o.includes("allOf"), v = o.includes("anyOf"), r = l || v, y = (r ? d[r ? l ? "allOf" : "anyOf" : "allOf"] : [d]).map((s) => F(s, g));
132
+ return l ? !y.includes(!1) : y.includes(!0);
133
133
  }
134
- return { parseValueSchema: $ };
134
+ return { parseValueSchema: R };
135
135
  }
136
136
  const Fe = {
137
- convertTo: (e, t, n, i) => {
137
+ convertTo: (e, t, n, a) => {
138
138
  e.appearance || (e.appearance = {}), e.appearance[t] = n;
139
139
  },
140
140
  convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
141
141
  }, De = {
142
142
  convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
143
143
  }, Be = {
144
- convertTo: (e, t, n, i) => {
144
+ convertTo: (e, t, n, a) => {
145
145
  e.editor && (e.editor[t] = n);
146
146
  },
147
147
  convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
@@ -195,16 +195,16 @@ const Fe = {
195
195
  }, ke = {
196
196
  convertFrom: (e, t, n) => {
197
197
  var S;
198
- const i = e.editor && e.editor[t] ? e.editor[t] : e[t];
199
- return ((S = te[i]) == null ? void 0 : S.name) || i;
198
+ const a = e.editor && e.editor[t] ? e.editor[t] : e[t];
199
+ return ((S = te[a]) == null ? void 0 : S.name) || a;
200
200
  }
201
201
  }, Ee = {
202
- convertTo: (e, t, n, i) => {
202
+ convertTo: (e, t, n, a) => {
203
203
  e[t] = e[t];
204
204
  },
205
205
  convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
206
206
  }, Oe = {
207
- convertTo: (e, t, n, i) => {
207
+ convertTo: (e, t, n, a) => {
208
208
  (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
209
209
  [t]: n
210
210
  });
@@ -235,7 +235,7 @@ const Fe = {
235
235
  return "none";
236
236
  }
237
237
  }, $e = {
238
- convertTo: (e, t, n, i) => {
238
+ convertTo: (e, t, n, a) => {
239
239
  e.command ? e.command[t] = n : e.command = {
240
240
  [t]: n
241
241
  }, t === "enable" && n && (e.command.commands || (e.command.commands = [
@@ -253,7 +253,7 @@ const Fe = {
253
253
  },
254
254
  convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : ""
255
255
  }, Ne = {
256
- convertTo: (e, t, n, i) => {
256
+ convertTo: (e, t, n, a) => {
257
257
  e.column ? e.column[t] = n : e.column = {
258
258
  [t]: n
259
259
  }, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average"));
@@ -267,8 +267,8 @@ const Fe = {
267
267
  }
268
268
  return "";
269
269
  }
270
- }, Re = {
271
- convertTo: (e, t, n, i) => {
270
+ }, je = {
271
+ convertTo: (e, t, n, a) => {
272
272
  e.summary ? e.summary[t] = n : e.summary = {
273
273
  [t]: n
274
274
  }, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
@@ -277,8 +277,8 @@ const Fe = {
277
277
  });
278
278
  },
279
279
  convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
280
- }, je = {
281
- convertTo: (e, t, n, i) => {
280
+ }, Re = {
281
+ convertTo: (e, t, n, a) => {
282
282
  e.group ? e.group[t] = n : e.group = {
283
283
  [t]: n
284
284
  }, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
@@ -299,67 +299,67 @@ const Fe = {
299
299
  convertFrom: (e, t) => e.binding ? e.binding.path : "",
300
300
  convertTo: (e, t, n) => {
301
301
  if (n && n.length > 0) {
302
- const i = n[0];
303
- e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = i.bindingField, e.binding.field = i.id, e.binding.fullPath = i.path, e.path = i.bindingPath;
302
+ const a = n[0];
303
+ e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = a.bindingField, e.binding.field = a.id, e.binding.fullPath = a.path, e.path = a.bindingPath;
304
304
  }
305
305
  }
306
- }, Le = {
307
- convertTo: (e, t, n, i) => {
306
+ }, Pe = {
307
+ convertTo: (e, t, n, a) => {
308
308
  e.pagination || (e.pagination = {}), e.pagination[t] = n;
309
309
  },
310
310
  convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
311
- }, Pe = {
312
- convertTo: (e, t, n, i) => {
311
+ }, Ce = {
312
+ convertTo: (e, t, n, a) => {
313
313
  e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
314
314
  },
315
315
  convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
316
- }, Ae = {
317
- convertTo: (e, t, n, i) => {
316
+ }, Le = {
317
+ convertTo: (e, t, n, a) => {
318
318
  e.selection || (e.selection = {}), e.selection[t] = n;
319
319
  },
320
320
  convertFrom: (e, t, n) => {
321
- var i, S;
322
- return t === "showCheckbox" ? (i = e.selection) != null && i.multiSelect ? !0 : (S = e.selection) == null ? void 0 : S.showCheckbox : e.selection ? e.selection[t] : e[t];
321
+ var a, S;
322
+ return t === "showCheckbox" ? (a = e.selection) != null && a.multiSelect ? !0 : (S = e.selection) == null ? void 0 : S.showCheckbox : e.selection ? e.selection[t] : e[t];
323
323
  }
324
- }, He = {
325
- convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
326
324
  }, ze = {
325
+ convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
326
+ }, Ae = {
327
327
  convertFrom: (e, t) => e[t] || "",
328
328
  convertTo: (e, t, n) => {
329
329
  e[t] = n;
330
330
  }
331
- }, Ce = {
332
- convertTo: (e, t, n, i) => {
331
+ }, He = {
332
+ convertTo: (e, t, n, a) => {
333
333
  e.size || (e.size = {}), e.size[t] = n;
334
334
  },
335
335
  convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
336
336
  }, We = {
337
337
  convertFrom: (e, t, n) => {
338
- var i, S;
339
- return (i = e.formatter) != null && i.data && t === "formatterEnumData" && !e.formatterEnumData ? (S = e.formatter) == null ? void 0 : S.data : e.formatterEnumData;
338
+ var a, S;
339
+ return (a = e.formatter) != null && a.data && t === "formatterEnumData" && !e.formatterEnumData ? (S = e.formatter) == null ? void 0 : S.data : e.formatterEnumData;
340
340
  }
341
341
  }, qe = {
342
- convertTo: (e, t, n, i) => {
342
+ convertTo: (e, t, n, a) => {
343
343
  e.sort || (e.sort = {}), e.sort[t] = n;
344
344
  },
345
345
  convertFrom: (e, t, n) => {
346
- var i, S;
346
+ var a, S;
347
347
  if (t === "mode")
348
- return ((i = e.sort) == null ? void 0 : i.mode) || "client";
348
+ return ((a = e.sort) == null ? void 0 : a.mode) || "client";
349
349
  if (t === "multiSort")
350
350
  return !!((S = e.sort) != null && S.multiSort);
351
351
  }
352
352
  }, _e = {
353
- convertTo: (e, t, n, i) => {
353
+ convertTo: (e, t, n, a) => {
354
354
  e.filter || (e.filter = {}), e.filter[t] = n;
355
355
  },
356
356
  convertFrom: (e, t, n) => {
357
- var i;
357
+ var a;
358
358
  if (t === "mode")
359
- return ((i = e.filter) == null ? void 0 : i.mode) || "client";
359
+ return ((a = e.filter) == null ? void 0 : a.mode) || "client";
360
360
  }
361
361
  }, Xe = {
362
- convertTo: (e, t, n, i) => {
362
+ convertTo: (e, t, n, a) => {
363
363
  e.rowOption ? e.rowOption[t] = n : e.rowOption = {
364
364
  [t]: n
365
365
  };
@@ -375,24 +375,24 @@ const Fe = {
375
375
  }
376
376
  };
377
377
  function ne(e, t, n) {
378
- const i = /* @__PURE__ */ new Map([
378
+ const a = /* @__PURE__ */ new Map([
379
379
  ["/converter/appearance.converter", Fe],
380
380
  ["/converter/buttons.converter", De],
381
381
  ["/converter/property-editor.converter", Be],
382
- ["/converter/items-count.converter", He],
382
+ ["/converter/items-count.converter", ze],
383
383
  ["/converter/type.converter", ke],
384
384
  ["/converter/change-editor.converter", Ee],
385
385
  ["/converter/change-formatter.converter", Oe],
386
386
  ["/converter/column-command.converter", $e],
387
387
  ["/converter/column-option.converter", Ne],
388
- ["/converter/summary.converter", Re],
389
- ["/converter/group.converter", je],
390
- ["/converter/form-group-label.converter", ze],
388
+ ["/converter/summary.converter", je],
389
+ ["/converter/group.converter", Re],
390
+ ["/converter/form-group-label.converter", Ae],
391
391
  ["/converter/field-selector.converter", Me],
392
- ["/converter/pagination.converter", Le],
393
- ["/converter/row-number.converter", Pe],
394
- ["/converter/grid-selection.converter", Ae],
395
- ["/converter/size.converter", Ce],
392
+ ["/converter/pagination.converter", Pe],
393
+ ["/converter/row-number.converter", Ce],
394
+ ["/converter/grid-selection.converter", Le],
395
+ ["/converter/size.converter", He],
396
396
  ["/converter/change-formatter-enum.converter", We],
397
397
  ["/converter/grid-sort.converter", qe],
398
398
  ["/converter/grid-filter.converter", _e],
@@ -422,105 +422,105 @@ function ne(e, t, n) {
422
422
  ["number", { type: "number-spinner", placeholder: "" }],
423
423
  ["events-editor", { type: "events-editor", hide: !0 }]
424
424
  ]), k = Te();
425
- function D(r, a) {
426
- return () => k.parseValueSchema(r, a);
425
+ function B(r, i) {
426
+ return () => k.parseValueSchema(r, i);
427
427
  }
428
- function T(r, a, u) {
429
- return r.includes("visible") && a.visible !== void 0 ? typeof a.visible == "boolean" ? () => !!a.visible : a.visible === void 0 ? !0 : D(a.visible, u) : () => !0;
428
+ function F(r, i, c) {
429
+ return r.includes("visible") && i.visible !== void 0 ? typeof i.visible == "boolean" ? () => !!i.visible : i.visible === void 0 ? !0 : B(i.visible, c) : () => !0;
430
430
  }
431
- function $(r, a, u) {
432
- return r.includes("readonly") && a.readonly !== void 0 ? typeof a.readonly == "boolean" ? () => !!a.readonly : D(a.readonly, u) : () => !1;
431
+ function R(r, i, c) {
432
+ return r.includes("readonly") && i.readonly !== void 0 ? typeof i.readonly == "boolean" ? () => !!i.readonly : B(i.readonly, c) : () => !1;
433
433
  }
434
- function d(r, a) {
435
- const u = r.$converter || a;
436
- return typeof u == "string" && u && i.has(u) ? i.get(u) || null : u || null;
434
+ function d(r, i) {
435
+ const c = r.$converter || i;
436
+ return typeof c == "string" && c && a.has(c) ? a.get(c) || null : c || null;
437
437
  }
438
- function b(r, a, u, w, f, s = "", E = "") {
439
- return Object.keys(r).map((y) => {
440
- const R = j(1), N = y, p = r[y], M = Object.keys(p), A = p.title, c = p.type, g = S.get(c) || { type: "input-group", enableClear: !1 }, m = p.editor ? Object.assign({}, g, p.editor) : Object.assign({}, g), h = T(M, p, a), F = $(M, p, a);
441
- m.readonly = m.readonly === void 0 ? F() : m.readonly;
442
- const L = p.type === "cascade" ? b(p.properties, a, u, w, f, s, E) : [], C = !0;
443
- let P = d(p, E);
444
- const H = ve({
438
+ function g(r, i, c, y, f, s = "", E = "") {
439
+ return Object.keys(r).map((w) => {
440
+ const N = j(1), $ = w, p = r[w], M = Object.keys(p), L = p.title, u = p.type, b = S.get(u) || { type: "input-group", enableClear: !1 }, m = p.editor ? Object.assign({}, b, p.editor) : Object.assign({}, b), h = F(M, p, i), T = R(M, p, i);
441
+ m.readonly = m.readonly === void 0 ? T() : m.readonly;
442
+ const P = p.type === "cascade" ? g(p.properties, i, c, y, f, s, E) : [], H = !0;
443
+ let C = d(p, E);
444
+ const z = ve({
445
445
  get() {
446
- if (R.value) {
447
- if (["class", "style"].find((me) => me === N) && !P && (P = i.get("/converter/appearance.converter") || null), P && P.convertFrom)
448
- return P.convertFrom(u, y, f, s);
449
- const z = u[y];
450
- return Object.prototype.hasOwnProperty.call(p, "defaultValue") && (z === void 0 || typeof z == "string" && z === "") ? p.type === "boolean" ? p.defaultValue : p.defaultValue || "" : z;
446
+ if (N.value) {
447
+ if (["class", "style"].find((me) => me === $) && !C && (C = a.get("/converter/appearance.converter") || null), C && C.convertFrom)
448
+ return C.convertFrom(c, w, f, s);
449
+ const A = c[w];
450
+ return Object.prototype.hasOwnProperty.call(p, "defaultValue") && (A === void 0 || typeof A == "string" && A === "") ? p.type === "boolean" ? p.defaultValue : p.defaultValue || "" : A;
451
451
  }
452
452
  return null;
453
453
  },
454
- set(z) {
455
- R.value += 1, P && P.convertTo ? (P.convertTo(w, y, z, f, s), P.convertTo(u, y, z, f, s)) : (w[y] = z, u[y] = z);
454
+ set(A) {
455
+ N.value += 1, C && C.convertTo ? (C.convertTo(y, w, A, f, s), C.convertTo(c, w, A, f, s)) : (y[w] = A, c[w] = A);
456
456
  }
457
- }), { refreshPanelAfterChanged: W, description: fe, isExpand: pe, parentPropertyID: de } = p, Z = { propertyID: N, propertyName: A, propertyType: c, propertyValue: H, editor: m, visible: h, readonly: F, cascadeConfig: L, hideCascadeTitle: C, refreshPanelAfterChanged: W, description: fe, isExpand: pe, parentPropertyID: de };
458
- return a[N] = Z, Z;
457
+ }), { refreshPanelAfterChanged: W, description: fe, isExpand: pe, parentPropertyID: de } = p, x = { propertyID: $, propertyName: L, propertyType: u, propertyValue: z, editor: m, visible: h, readonly: T, cascadeConfig: P, hideCascadeTitle: H, refreshPanelAfterChanged: W, description: fe, isExpand: pe, parentPropertyID: de };
458
+ return i[$] = x, x;
459
459
  });
460
460
  }
461
- function o(r, a, u = {}) {
462
- const w = {}, f = e[r];
461
+ function o(r, i, c = {}) {
462
+ const y = {}, f = e[r];
463
463
  return f && f.categories ? Object.keys(f.categories).map((E) => {
464
- const B = f.categories[E], y = B == null ? void 0 : B.title, R = b(B.properties || {}, w, {}, u, a);
465
- return { categoryId: E, categoryName: y, properties: R };
464
+ const D = f.categories[E], w = D == null ? void 0 : D.title, N = g(D.properties || {}, y, {}, c, i);
465
+ return { categoryId: E, categoryName: w, properties: N };
466
466
  }) : [];
467
467
  }
468
- function l(r, a, u, w, f = "") {
469
- const s = a.$ref.schema, E = a.$ref.converter, B = u[s], y = B.type, R = n(B), N = {}, p = e[y];
468
+ function l(r, i, c, y, f = "") {
469
+ const s = i.$ref.schema, E = i.$ref.converter, D = c[s], w = D.type, N = n(D), $ = {}, p = e[w];
470
470
  if (p && p.categories) {
471
- const M = p.categories[r], A = M == null ? void 0 : M.title;
471
+ const M = p.categories[r], L = M == null ? void 0 : M.title;
472
472
  E && Object.keys(M.properties).forEach((m) => {
473
473
  M.properties[m].$converter = E;
474
474
  });
475
- const c = (M == null ? void 0 : M.properties) || {}, g = b(c, N, R, B, w, f);
476
- return { categoryId: r, categoryName: A, properties: g };
475
+ const u = (M == null ? void 0 : M.properties) || {}, b = g(u, $, N, D, y, f);
476
+ return { categoryId: r, categoryName: L, properties: b };
477
477
  }
478
478
  return { categoryId: r, categoryName: "", properties: [] };
479
479
  }
480
- function v(r, a, u, w, f) {
481
- const s = r.type, E = n(r), B = {};
482
- let y = f || e[s];
483
- if (y && Object.keys(y).length === 0 && u && u.getPropConfig && (y = u.getPropConfig(w)), y && y.categories) {
484
- const R = [];
485
- return Object.keys(y.categories).map((N) => {
486
- const p = y.categories[N];
480
+ function v(r, i, c, y, f) {
481
+ const s = r.type, E = n(r), D = {};
482
+ let w = f || e[s];
483
+ if (w && Object.keys(w).length === 0 && c && c.getPropConfig && (w = c.getPropConfig(y)), w && w.categories) {
484
+ const N = [];
485
+ return Object.keys(w.categories).map(($) => {
486
+ const p = w.categories[$];
487
487
  if (p.$ref) {
488
- R.push(l(N, p, r, a, w));
488
+ N.push(l($, p, r, i, y));
489
489
  return;
490
490
  }
491
- const M = p == null ? void 0 : p.title, A = p == null ? void 0 : p.tabId, c = p == null ? void 0 : p.tabName, g = p == null ? void 0 : p.hide, m = p == null ? void 0 : p.hideTitle, h = b(p.properties || {}, B, E, r, a, w, p.$converter), { setPropertyRelates: F } = p, L = p == null ? void 0 : p.parentPropertyID;
492
- R.push({ categoryId: N, categoryName: M, tabId: A, tabName: c, hide: g, properties: h, hideTitle: m, setPropertyRelates: F, parentPropertyID: L });
493
- }), R;
491
+ const M = p == null ? void 0 : p.title, L = p == null ? void 0 : p.tabId, u = p == null ? void 0 : p.tabName, b = p == null ? void 0 : p.hide, m = p == null ? void 0 : p.hideTitle, h = g(p.properties || {}, D, E, r, i, y, p.$converter), { setPropertyRelates: T } = p, P = p == null ? void 0 : p.parentPropertyID;
492
+ N.push({ categoryId: $, categoryName: M, tabId: L, tabName: u, hide: b, properties: h, hideTitle: m, setPropertyRelates: T, parentPropertyID: P });
493
+ }), N;
494
494
  }
495
495
  return [];
496
496
  }
497
497
  return {
498
498
  getPropertyConfigBySchema: v,
499
499
  getPropertyConfigByType: o,
500
- propertyConverterMap: i
500
+ propertyConverterMap: a
501
501
  };
502
502
  }
503
503
  const oe = {}, re = {};
504
504
  ne(oe, re, we);
505
- const ie = {}, ae = {}, { resolveSchemaWithDefaultValue: Ge } = I(ie, ae), se = {}, le = {};
505
+ const ie = {}, ae = {}, { getSchemaByType: gt, resolveSchemaWithDefaultValue: Ge, resolveSchemaToProps: bt, mappingSchemaToProps: yt, setDesignerContext: wt } = I(ie, ae), se = {}, le = {};
506
506
  ne(se, le, Ge);
507
- function Ue(e, t, n = /* @__PURE__ */ new Map(), i = (D, T, $, d) => T, S = {}, k = (D) => D) {
508
- return K[t.title] = t, ee[t.title] = i, oe[t.title] = S, re[t.title] = k, ie[t.title] = t, ae[t.title] = i, se[t.title] = S, le[t.title] = k, (D = {}, T = !0) => {
509
- if (!T)
510
- return Se(D, n);
511
- const $ = he(D, t, n), d = Object.keys(e).reduce((b, o) => (b[o] = e[o].default, b), {});
512
- return Object.assign(d, $);
507
+ function Ue(e, t, n = /* @__PURE__ */ new Map(), a = (B, F, R, d) => F, S = {}, k = (B) => B) {
508
+ return K[t.title] = t, ee[t.title] = a, oe[t.title] = S, re[t.title] = k, ie[t.title] = t, ae[t.title] = a, se[t.title] = S, le[t.title] = k, (B = {}, F = !0) => {
509
+ if (!F)
510
+ return Se(B, n);
511
+ const R = he(B, t, n), d = Object.keys(e).reduce((g, o) => (g[o] = e[o].default, g), {});
512
+ return Object.assign(d, R);
513
513
  };
514
514
  }
515
515
  function Ye(e, t) {
516
516
  return { customClass: t.class, customStyle: t.style };
517
517
  }
518
- function Ze(e, t, n) {
518
+ function xe(e, t, n) {
519
519
  return t;
520
520
  }
521
- const Je = /* @__PURE__ */ new Map([
521
+ const Ze = /* @__PURE__ */ new Map([
522
522
  ["appearance", Ye]
523
- ]), Qe = "https://json-schema.org/draft/2020-12/schema", xe = "https://farris-design.gitee.io/dropdown.schema.json", Ve = "dropdown", Ie = "A Farris Component", Ke = "object", et = {
523
+ ]), Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-design.gitee.io/dropdown.schema.json", Ve = "dropdown", Ie = "A Farris Component", Ke = "object", et = {
524
524
  id: {
525
525
  description: "The unique identifier for dropdown",
526
526
  type: "string"
@@ -586,8 +586,8 @@ const Je = /* @__PURE__ */ new Map([
586
586
  "id",
587
587
  "type"
588
588
  ], nt = {
589
- $schema: Qe,
590
- $id: xe,
589
+ $schema: Je,
590
+ $id: Qe,
591
591
  title: Ve,
592
592
  description: Ie,
593
593
  type: Ke,
@@ -687,14 +687,14 @@ const Je = /* @__PURE__ */ new Map([
687
687
  },
688
688
  onSelect: { type: Function, default: () => {
689
689
  } }
690
- }, x = Ue(Y, nt, Je, Ze, st);
690
+ }, Q = Ue(Y, nt, Ze, xe, st);
691
691
  function ce(e, t) {
692
692
  let n;
693
- const i = j(e.show), S = j(), k = j(), D = j(), T = 10;
693
+ const a = j(e.show), S = j(), k = j(), B = j(), F = 10;
694
694
  G(() => {
695
695
  n = k.value;
696
696
  });
697
- const $ = (f = 1) => {
697
+ const R = (f = 1) => {
698
698
  const s = [
699
699
  "body>.f-datagrid-settings-simple-host",
700
700
  "body>div",
@@ -705,66 +705,66 @@ function ce(e, t) {
705
705
  "body>.popover.show",
706
706
  "body>filter-row-panel>.f-datagrid-filter-panel",
707
707
  "body>.f-section-maximize"
708
- ], E = Array.from(document.body.querySelectorAll(s.join(","))).filter((y) => y).map((y) => {
709
- const { display: R, zIndex: N } = window.getComputedStyle(y);
710
- return R === "none" ? 0 : parseInt(N, 10);
711
- }).filter((y) => y);
712
- let B = Math.max(...E);
713
- return B < 1040 && (B = 1040), B + f;
708
+ ], E = Array.from(document.body.querySelectorAll(s.join(","))).filter((w) => w).map((w) => {
709
+ const { display: N, zIndex: $ } = window.getComputedStyle(w);
710
+ return N === "none" ? 0 : parseInt($, 10);
711
+ }).filter((w) => w);
712
+ let D = Math.max(...E);
713
+ return D < 1040 && (D = 1040), D + f;
714
714
  }, d = (f, s) => {
715
715
  const {
716
716
  height: E,
717
- left: B,
718
- top: y,
719
- width: R
720
- } = f.getBoundingClientRect(), { width: N, height: p, top: M } = s.getBoundingClientRect();
717
+ left: D,
718
+ top: w,
719
+ width: N
720
+ } = f.getBoundingClientRect(), { width: $, height: p, top: M } = s.getBoundingClientRect();
721
721
  if (f.className.indexOf("dropdown-submenu") > -1 || f.closest(".dropdown-submenu") || f.classList.contains("dropright")) {
722
- const c = window.innerWidth - B - f.offsetWidth, g = window.innerHeight - y, { position: m } = getComputedStyle(s);
722
+ const u = window.innerWidth - D - f.offsetWidth, b = window.innerHeight - w, { position: m } = getComputedStyle(s);
723
723
  if (m === "fixed") {
724
- let h = B + f.offsetWidth;
725
- s.offsetWidth > c && B > c && (h = B - N), s.style.left = h + "px", s.style.right = "auto", window.innerHeight - 2 * T < s.offsetHeight ? (s.style.top = T + "px", s.style.bottom = T + "px", s.style.maxHeight = window.innerHeight - 2 * T + "px", s.style.overflowY = "auto", s.className += " dropdown-menu-maxheight") : g < s.offsetHeight ? (s.style.top = "auto", s.style.bottom = T + "px") : (s.style.top = y + "px", s.style.bottom = "auto");
724
+ let h = D + f.offsetWidth;
725
+ s.offsetWidth > u && D > u && (h = D - $), s.style.left = h + "px", s.style.right = "auto", window.innerHeight - 2 * F < s.offsetHeight ? (s.style.top = F + "px", s.style.bottom = F + "px", s.style.maxHeight = window.innerHeight - 2 * F + "px", s.style.overflowY = "auto", s.className += " dropdown-menu-maxheight") : b < s.offsetHeight ? (s.style.top = "auto", s.style.bottom = F + "px") : (s.style.top = w + "px", s.style.bottom = "auto");
726
726
  } else {
727
- if (s.offsetWidth > c) {
728
- const h = -N;
727
+ if (s.offsetWidth > u) {
728
+ const h = -$;
729
729
  s.style.left = h + "px";
730
730
  }
731
- window.innerHeight - 2 * T < s.offsetHeight ? (s.style.top = -1 * (y - T) + "px", s.style.bottom = "auto", s.style.maxHeight = window.innerHeight - 2 * T + "px", s.style.overflowY = "auto", s.className += " dropdown-menu-maxheight") : g < s.offsetHeight && (s.style.top = g - s.offsetHeight - T + "px", s.style.bottom = "auto");
731
+ window.innerHeight - 2 * F < s.offsetHeight ? (s.style.top = -1 * (w - F) + "px", s.style.bottom = "auto", s.style.maxHeight = window.innerHeight - 2 * F + "px", s.style.overflowY = "auto", s.className += " dropdown-menu-maxheight") : b < s.offsetHeight && (s.style.top = b - s.offsetHeight - F + "px", s.style.bottom = "auto");
732
732
  }
733
733
  } else {
734
- const { marginTop: c, marginBottom: g } = getComputedStyle(s);
734
+ const { marginTop: u, marginBottom: b } = getComputedStyle(s);
735
735
  let m = 0;
736
- const h = Math.ceil(parseFloat(c)) + Math.ceil(parseFloat(g));
737
- let F = y + E, L = B;
738
- window.innerHeight - F - h < p && (F = y - p, F < 0 && (window.innerHeight - y - E > y ? (F = y + E, m = window.innerHeight - F - h - T) : (F = T, m = y - F - h))), window.innerWidth - B < N && window.innerWidth - B < B + R && (L = B - N + R), document.body.append(s), s.style.cssText = `position:fixed;bottom:unset;left:${L}px
739
- !important;top:${F}px !important;right: unset;${m ? "max-height:" + m + "px;overflow-y:auto;" : ""}`, m && (s.className += " dropdown-menu-maxheight"), s.style.zIndex = $().toString();
736
+ const h = Math.ceil(parseFloat(u)) + Math.ceil(parseFloat(b));
737
+ let T = w + E, P = D;
738
+ window.innerHeight - T - h < p && (T = w - p, T < 0 && (window.innerHeight - w - E > w ? (T = w + E, m = window.innerHeight - T - h - F) : (T = F, m = w - T - h))), window.innerWidth - D < $ && window.innerWidth - D < D + N && (P = D - $ + N), document.body.append(s), s.style.cssText = `position:fixed;bottom:unset;left:${P}px
739
+ !important;top:${T}px !important;right: unset;${m ? "max-height:" + m + "px;overflow-y:auto;" : ""}`, m && (s.className += " dropdown-menu-maxheight"), s.style.zIndex = R().toString();
740
740
  }
741
- }, b = () => {
741
+ }, g = () => {
742
742
  d(S.value, k.value);
743
743
  }, o = () => {
744
- e.hover || (i.value = !1, k.value.style = null, document.removeEventListener("click", o), n.removeEventListener("click", o), document.removeEventListener("scroll", o), n.removeEventListener("scroll", o));
744
+ e.hover || (a.value = !1, k.value.style = null, document.removeEventListener("click", o), n.removeEventListener("click", o), document.removeEventListener("scroll", o), n.removeEventListener("scroll", o));
745
745
  }, l = (f = null, s = !1) => {
746
746
  e.hover || e.disabled || (f == null || f.stopPropagation(), s ? (setTimeout(() => {
747
- b();
748
- }), i.value = !0) : (i.value || setTimeout(() => {
749
- b();
750
- }), i.value = !i.value), document.addEventListener("click", o), document.addEventListener("scroll", o), e.hideOnClick || (n.addEventListener("click", (E) => {
747
+ g();
748
+ }), a.value = !0) : (a.value || setTimeout(() => {
749
+ g();
750
+ }), a.value = !a.value), document.addEventListener("click", o), document.addEventListener("scroll", o), e.hideOnClick || (n.addEventListener("click", (E) => {
751
751
  E.stopPropagation();
752
752
  }), n.addEventListener("scroll", (E) => {
753
753
  E.stopPropagation();
754
754
  })));
755
755
  };
756
756
  return {
757
- show: i,
757
+ show: a,
758
758
  dropdownRef: S,
759
759
  dropdownMenuRef: k,
760
- clickEventRef: D,
760
+ clickEventRef: B,
761
761
  showDropMenu: (f) => {
762
762
  l(f, !1);
763
763
  },
764
764
  showDropMenuByForce: l,
765
765
  hoverDropdown: (f) => {
766
- e.hover && (i.value || setTimeout(() => {
767
- }), i.value = !i.value);
766
+ e.hover && (a.value || setTimeout(() => {
767
+ }), a.value = !a.value);
768
768
  },
769
769
  leftButtonClick: () => {
770
770
  },
@@ -794,16 +794,16 @@ const lt = {
794
794
  props: lt,
795
795
  emits: ["select"],
796
796
  setup(e, t) {
797
- const n = j(e.value), i = j(e.label), S = j(e.disabled), k = j(e.active), D = j(e.divide), T = () => {
797
+ const n = j(e.value), a = j(e.label), S = j(e.disabled), k = j(e.active), B = j(e.divide), F = () => {
798
798
  S.value || t.emit("select", e);
799
799
  };
800
800
  return () => O("div", null, [_(O("div", {
801
801
  class: "dropdown-divider"
802
- }, null), [[X, D.value]]), O("li", {
802
+ }, null), [[X, B.value]]), O("li", {
803
803
  class: `dropdown-item${k.value ? " active" : ""} ${S.value ? " disabled" : ""}`,
804
- onClick: T,
804
+ onClick: F,
805
805
  title: n.value.toString()
806
- }, [i.value])]);
806
+ }, [a.value])]);
807
807
  }
808
808
  }), q = /* @__PURE__ */ U({
809
809
  name: "FDropdown",
@@ -811,20 +811,22 @@ const lt = {
811
811
  emits: ["select"],
812
812
  setup(e, t) {
813
813
  const n = j(e.model), {
814
- show: i,
814
+ show: a,
815
815
  dropdownMenuRef: S,
816
816
  dropdownRef: k,
817
- clickEventRef: D,
818
- showDropMenu: T,
819
- hoverDropdown: $,
817
+ clickEventRef: B,
818
+ showDropMenu: F,
819
+ hoverDropdown: R,
820
820
  leftButtonClick: d,
821
- showDropMenuByForce: b,
822
- closeDropMenu: o
821
+ showDropMenuByForce: g,
822
+ closeDropMenu: o,
823
+ selectItem: l,
824
+ resolveSize: v
823
825
  } = ce(e, t);
824
- function l(r) {
825
- o(), t.emit("select", r);
826
+ function r(c) {
827
+ o(), t.emit("select", c);
826
828
  }
827
- function v() {
829
+ function i() {
828
830
  return [{
829
831
  "dropdown-item": e.nest
830
832
  }, {
@@ -850,7 +852,7 @@ const lt = {
850
852
  }];
851
853
  }
852
854
  return G(() => {
853
- i.value && b(null, !0);
855
+ a.value && g(null, !0);
854
856
  }), () => O("div", {
855
857
  ref: k
856
858
  }, [O("div", {
@@ -864,185 +866,185 @@ const lt = {
864
866
  dropright: e.position === "right"
865
867
  }]
866
868
  }, [e.splitButton && O("span", {
867
- class: ["btn", ...v()],
869
+ class: ["btn", ...i()],
868
870
  style: "width:100%",
869
871
  onClick: d
870
872
  }, [e.title]), O("span", {
871
- ref: D,
873
+ ref: B,
872
874
  class: ["dropdown-toggle", {
873
875
  btn: !e.nest
874
876
  }, {
875
877
  "dropdown-toggle-split": e.splitButton
876
- }, ...v()],
878
+ }, ...i()],
877
879
  style: "width:100%",
878
- onClick: T,
879
- onMouseenter: $,
880
- onMouseleave: $
880
+ onClick: F,
881
+ onMouseenter: R,
882
+ onMouseleave: R
881
883
  }, [e.splitButton ? "" : e.title, e.iconClass && O("span", {
882
884
  class: `f-icon ${e.iconClass}`
883
- }, null)]), O(be, {
885
+ }, null)]), O(ge, {
884
886
  to: "body"
885
887
  }, {
886
888
  default: () => [O("div", {
887
889
  ref: S,
888
- class: `dropdown-menu${i.value ? " show" : ""}`
890
+ class: `dropdown-menu${a.value ? " show" : ""}`
889
891
  }, [O(V, null, [n.value.map(({
890
- label: r,
891
- value: a,
892
- disabled: u,
893
- active: w,
894
- divide: f
892
+ label: c,
893
+ value: y,
894
+ disabled: f,
895
+ active: s,
896
+ divide: E
895
897
  }) => O(ue, {
896
- value: a.toString(),
897
- label: r,
898
- disabled: u,
899
- active: w,
900
- divide: f,
901
- onSelect: (s) => l(s)
898
+ value: y.toString(),
899
+ label: c,
900
+ disabled: f,
901
+ active: s,
902
+ divide: E,
903
+ onSelect: (D) => r(D)
902
904
  }, null))])])]
903
905
  })])]);
904
906
  }
905
907
  });
906
908
  function ct(e, t, n) {
907
- var A;
908
- const i = "", S = "", k = j();
909
- let D;
910
- function T() {
909
+ var L;
910
+ const a = "", S = "", k = j();
911
+ let B;
912
+ function F() {
911
913
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
912
914
  }
913
- function $() {
915
+ function R() {
914
916
  return !1;
915
917
  }
916
918
  function d() {
917
919
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
918
920
  }
919
- function b() {
921
+ function g() {
920
922
  return (t == null ? void 0 : t.schema.componentType) === "frame";
921
923
  }
922
- function o(c) {
923
- if (!c || !c.value)
924
+ function o(u) {
925
+ if (!u || !u.value)
924
926
  return null;
925
- if (c.value.schema && c.value.schema.type === "component")
926
- return c.value;
927
- const g = j(c == null ? void 0 : c.value.parent), m = o(g);
927
+ if (u.value.schema && u.value.schema.type === "component")
928
+ return u.value;
929
+ const b = j(u == null ? void 0 : u.value.parent), m = o(b);
928
930
  return m || null;
929
931
  }
930
- function l(c = t) {
931
- var F;
932
- const { componentInstance: g, designerItemElementRef: m } = c;
933
- if (!g || !g.value)
932
+ function l(u = t) {
933
+ var T;
934
+ const { componentInstance: b, designerItemElementRef: m } = u;
935
+ if (!b || !b.value)
934
936
  return null;
935
- const { getCustomButtons: h } = g.value;
936
- return g.value.canMove || h && ((F = h()) != null && F.length) ? m : l(c.parent);
937
+ const { getCustomButtons: h } = b.value;
938
+ return b.value.canMove || h && ((T = h()) != null && T.length) ? m : l(u.parent);
937
939
  }
938
- function v(c) {
939
- return !1;
940
+ function v(u) {
941
+ return !!n;
940
942
  }
941
943
  function r() {
942
944
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
943
945
  }
944
- function a() {
946
+ function i() {
945
947
  }
946
- function u(c, g) {
948
+ function c(u, b) {
947
949
  var m;
948
- !c || !g || (m = t == null ? void 0 : t.setupContext) == null || m.emit("dragEnd");
950
+ !u || !b || (m = t == null ? void 0 : t.setupContext) == null || m.emit("dragEnd");
949
951
  }
950
- function w(c, g) {
951
- const { componentType: m } = c;
952
- let h = ye(m, c, g);
953
- const F = m.toLowerCase().replace(/-/g, "_");
954
- return h && !h.id && h.type === m && (h.id = `${F}_${Math.random().toString().slice(2, 6)}`), h;
952
+ function y(u, b) {
953
+ const { componentType: m } = u;
954
+ let h = ye(m, u, b);
955
+ const T = m.toLowerCase().replace(/-/g, "_");
956
+ return h && !h.id && h.type === m && (h.id = `${T}_${Math.random().toString().slice(2, 6)}`), h;
955
957
  }
956
- function f(c) {
958
+ function f(u) {
957
959
  }
958
- function s(...c) {
960
+ function s(...u) {
959
961
  }
960
- function E(c) {
961
- if (!c)
962
+ function E(u) {
963
+ if (!u)
962
964
  return;
963
- const g = t == null ? void 0 : t.schema, { formSchemaUtils: m } = c;
964
- if (g && m.getExpressions().length) {
965
- const h = m.getExpressions().findIndex((F) => F.target === g.id);
965
+ const b = t == null ? void 0 : t.schema, { formSchemaUtils: m } = u;
966
+ if (b && m.getExpressions().length) {
967
+ const h = m.getExpressions().findIndex((T) => T.target === b.id);
966
968
  h > -1 && m.getExpressions().splice(h, 1);
967
969
  }
968
970
  }
969
- function B(c) {
970
- if (!c || !(t != null && t.schema))
971
+ function D(u) {
972
+ if (!u || !(t != null && t.schema))
971
973
  return;
972
- const g = t.schema, { formSchemaUtils: m } = c;
973
- m.removeCommunicationInComponent(g);
974
+ const b = t.schema, { formSchemaUtils: m } = u;
975
+ m.removeCommunicationInComponent(b);
974
976
  }
975
- function y(c) {
976
- E(c), B(c), t != null && t.schema.contents && t.schema.contents.map((g) => {
977
- let m = g.id;
978
- g.type === "component-ref" && (m = g.component);
977
+ function w(u) {
978
+ E(u), D(u), t != null && t.schema.contents && t.schema.contents.map((b) => {
979
+ let m = b.id;
980
+ b.type === "component-ref" && (m = b.component);
979
981
  const h = e.value.querySelectorAll(`#${m}-design-item`);
980
- h != null && h.length && Array.from(h).map((F) => {
981
- var L;
982
- (L = F == null ? void 0 : F.componentInstance) != null && L.value.onRemoveComponent && F.componentInstance.value.onRemoveComponent(c);
982
+ h != null && h.length && Array.from(h).map((T) => {
983
+ var P;
984
+ (P = T == null ? void 0 : T.componentInstance) != null && P.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent(u);
983
985
  });
984
986
  });
985
987
  }
986
- function R() {
988
+ function N() {
987
989
  }
988
- function N(c) {
990
+ function $(u) {
989
991
  var m, h;
990
992
  if (!((m = t == null ? void 0 : t.schema) != null && m.id))
991
993
  return;
992
- !D && c && (D = c.formSchemaUtils);
993
- let g = "";
994
+ !B && u && (B = u.formSchemaUtils);
995
+ let b = "";
994
996
  {
995
- const { text: F, title: L, label: C, mainTitle: P, name: H, type: W } = t.schema;
996
- g = F || L || C || P || H || ((h = te[W]) == null ? void 0 : h.name);
997
+ const { text: T, title: P, label: H, mainTitle: C, name: z, type: W } = t.schema;
998
+ b = T || P || H || C || z || ((h = te[W]) == null ? void 0 : h.name);
997
999
  }
998
- g && D.getControlBasicInfoMap().set(t.schema.id, {
999
- componentTitle: g,
1000
- parentPathName: g
1000
+ b && B.getControlBasicInfoMap().set(t.schema.id, {
1001
+ componentTitle: b,
1002
+ parentPathName: b
1001
1003
  });
1002
1004
  }
1003
- function p(c) {
1004
- var F;
1005
- const { changeObject: g } = c, { propertyID: m, propertyValue: h } = g;
1006
- if (["text", "title", "label", "name", "mainTitle"].includes((F = c == null ? void 0 : c.changeObject) == null ? void 0 : F.propertyID) && m && h && (N(), D)) {
1007
- const L = D.getControlBasicInfoMap(), C = L.keys().toArray().filter((P) => {
1008
- var H, W;
1009
- return ((H = L.get(P)) == null ? void 0 : H.reliedComponentId) === ((W = t == null ? void 0 : t.schema) == null ? void 0 : W.id);
1005
+ function p(u) {
1006
+ var T;
1007
+ const { changeObject: b } = u, { propertyID: m, propertyValue: h } = b;
1008
+ if (["text", "title", "label", "name", "mainTitle"].includes((T = u == null ? void 0 : u.changeObject) == null ? void 0 : T.propertyID) && m && h && ($(), B)) {
1009
+ const P = B.getControlBasicInfoMap(), H = P.keys().toArray().filter((C) => {
1010
+ var z, W;
1011
+ return ((z = P.get(C)) == null ? void 0 : z.reliedComponentId) === ((W = t == null ? void 0 : t.schema) == null ? void 0 : W.id);
1010
1012
  });
1011
- C != null && C.length && C.forEach((P) => {
1012
- const H = L.get(P).parentPathName.split(" > ");
1013
- H[0] = h, L.get(P).parentPathName = H.join(" > ");
1013
+ H != null && H.length && H.forEach((C) => {
1014
+ const z = P.get(C).parentPathName.split(" > ");
1015
+ z[0] = h, P.get(C).parentPathName = z.join(" > ");
1014
1016
  });
1015
1017
  }
1016
1018
  }
1017
- function M(c) {
1018
- p(c);
1019
+ function M(u) {
1020
+ p(u);
1019
1021
  }
1020
1022
  return k.value = {
1021
- canMove: T(),
1022
- canSelectParent: $(),
1023
+ canMove: F(),
1024
+ canSelectParent: R(),
1023
1025
  canDelete: d(),
1024
- canNested: !b(),
1026
+ canNested: !g(),
1025
1027
  contents: t == null ? void 0 : t.schema.contents,
1026
1028
  elementRef: e,
1027
- parent: (A = t == null ? void 0 : t.parent) == null ? void 0 : A.componentInstance,
1029
+ parent: (L = t == null ? void 0 : t.parent) == null ? void 0 : L.componentInstance,
1028
1030
  schema: t == null ? void 0 : t.schema,
1029
- styles: i,
1031
+ styles: a,
1030
1032
  designerClass: S,
1031
1033
  canAccepts: v,
1032
1034
  getBelongedComponentInstance: o,
1033
1035
  getDraggableDesignItemElement: l,
1034
1036
  getDraggingDisplayText: r,
1035
1037
  getPropConfig: s,
1036
- getDragScopeElement: a,
1037
- onAcceptMovedChildElement: u,
1038
+ getDragScopeElement: i,
1039
+ onAcceptMovedChildElement: c,
1038
1040
  onChildElementMovedOut: f,
1039
- addNewChildComponentSchema: w,
1041
+ addNewChildComponentSchema: y,
1040
1042
  triggerBelongedComponentToMoveWhenMoved: j(!1),
1041
1043
  triggerBelongedComponentToDeleteWhenDeleted: j(!1),
1042
- onRemoveComponent: y,
1043
- getCustomButtons: R,
1044
+ onRemoveComponent: w,
1045
+ getCustomButtons: N,
1044
1046
  onPropertyChanged: M,
1045
- setComponentBasicInfoMap: N,
1047
+ setComponentBasicInfoMap: $,
1046
1048
  updateContextSchema: t == null ? void 0 : t.updateContextSchema
1047
1049
  }, k;
1048
1050
  }
@@ -1052,19 +1054,22 @@ const ut = /* @__PURE__ */ U({
1052
1054
  emits: ["select"],
1053
1055
  setup(e, t) {
1054
1056
  const n = j(e.model), {
1055
- show: i,
1057
+ show: a,
1056
1058
  showDropMenu: S,
1057
1059
  hoverDropdown: k,
1058
- leftButtonClick: D
1060
+ leftButtonClick: B,
1061
+ closeDropMenu: F,
1062
+ selectItem: R,
1063
+ resolveSize: d
1059
1064
  } = ce(e, t);
1060
- function T(o) {
1061
- t.emit("select", o);
1065
+ function g(r) {
1066
+ t.emit("select", r);
1062
1067
  }
1063
- const $ = j(), d = ge("design-item-context"), b = ct($, d);
1068
+ const o = j(), l = be("design-item-context"), v = ct(o, l);
1064
1069
  return G(() => {
1065
- $.value.componentInstance = b;
1066
- }), t.expose(b.value), () => O("div", {
1067
- ref: $
1070
+ o.value.componentInstance = v;
1071
+ }), t.expose(v.value), () => O("div", {
1072
+ ref: o
1068
1073
  }, [O("div", {
1069
1074
  class: ["farris-dropdown", "btn-group", {
1070
1075
  dropup: e.position === "top"
@@ -1097,7 +1102,7 @@ const ut = /* @__PURE__ */ U({
1097
1102
  "btn-info": e.type === "info"
1098
1103
  }],
1099
1104
  style: "width:100%",
1100
- onClick: D
1105
+ onClick: B
1101
1106
  }, [e.title]), O("span", {
1102
1107
  class: ["dropdown-toggle", {
1103
1108
  btn: !e.nest
@@ -1135,36 +1140,36 @@ const ut = /* @__PURE__ */ U({
1135
1140
  }, null), [[X, e.splitButton]]), e.splitButton ? "" : e.title, _(O("span", {
1136
1141
  class: `f-icon ${e.iconClass.toString()}`
1137
1142
  }, null), [[X, e.iconClass]])]), O("div", {
1138
- class: `dropdown-menu${i.value ? " show" : ""}`
1143
+ class: `dropdown-menu${a.value ? " show" : ""}`
1139
1144
  }, [O(V, null, [n.value.map(({
1140
- label: o,
1141
- value: l,
1142
- disabled: v,
1143
- active: r,
1144
- divide: a
1145
+ label: r,
1146
+ value: i,
1147
+ disabled: c,
1148
+ active: y,
1149
+ divide: f
1145
1150
  }) => O(ue, {
1146
- value: l.toString(),
1147
- label: o,
1148
- disabled: v,
1149
- active: r,
1150
- divide: a,
1151
- onSelect: (u) => T(u)
1151
+ value: i.toString(),
1152
+ label: r,
1153
+ disabled: c,
1154
+ active: y,
1155
+ divide: f,
1156
+ onSelect: (s) => g(s)
1152
1157
  }, null))])])])]);
1153
1158
  }
1154
- }), mt = {
1159
+ }), ht = {
1155
1160
  install(e) {
1156
1161
  e.component(q.name, q);
1157
1162
  },
1158
- register(e, t, n, i) {
1159
- e.dropdown = q, t.dropdown = x;
1163
+ register(e, t, n, a) {
1164
+ e.dropdown = q, t.dropdown = Q;
1160
1165
  },
1161
1166
  registerDesigner(e, t, n) {
1162
- e.dropdown = ut, t.dropdown = x;
1167
+ e.dropdown = ut, t.dropdown = Q;
1163
1168
  }
1164
1169
  };
1165
1170
  export {
1166
1171
  q as Dropdown,
1167
- mt as default,
1172
+ ht as default,
1168
1173
  Y as dropdownProps,
1169
- x as propsResolver
1174
+ Q as propsResolver
1170
1175
  };