@farris/ui-vue 1.3.0 → 1.3.1

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 (201) hide show
  1. package/components/accordion/index.esm.js +1 -1
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +472 -366
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +1 -1
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +472 -480
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +225 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +615 -517
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +325 -333
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +578 -472
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +49 -49
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/common/index.esm.js +832 -722
  20. package/components/common/index.umd.cjs +1 -1
  21. package/components/component/index.esm.js +303 -981
  22. package/components/component/index.umd.cjs +1 -1
  23. package/components/condition/index.esm.js +8 -8
  24. package/components/condition/index.umd.cjs +1 -1
  25. package/components/content-container/index.esm.js +335 -1002
  26. package/components/content-container/index.umd.cjs +1 -1
  27. package/components/data-grid/index.esm.js +4429 -4312
  28. package/components/data-grid/index.umd.cjs +1 -1
  29. package/components/data-view/index.esm.js +3037 -3020
  30. package/components/data-view/index.umd.cjs +1 -1
  31. package/components/date-picker/index.esm.js +2216 -2119
  32. package/components/date-picker/index.umd.cjs +1 -1
  33. package/components/designer-canvas/index.css +1 -1
  34. package/components/designer-canvas/index.esm.js +914 -883
  35. package/components/designer-canvas/index.umd.cjs +1 -1
  36. package/components/dropdown/index.esm.js +223 -231
  37. package/components/dropdown/index.umd.cjs +2 -2
  38. package/components/dynamic-form/index.esm.js +1691 -2187
  39. package/components/dynamic-form/index.umd.cjs +1 -1
  40. package/components/dynamic-resolver/index.esm.js +143 -136
  41. package/components/dynamic-resolver/index.umd.cjs +1 -1
  42. package/components/events-editor/index.esm.js +250 -258
  43. package/components/events-editor/index.umd.cjs +1 -1
  44. package/components/expression-editor/index.esm.js +1 -1
  45. package/components/expression-editor/index.umd.cjs +1 -1
  46. package/components/external-container/index.esm.js +2672 -3438
  47. package/components/external-container/index.umd.cjs +1 -1
  48. package/components/field-selector/index.esm.js +2965 -2970
  49. package/components/field-selector/index.umd.cjs +1 -1
  50. package/components/filter-bar/index.esm.js +1650 -1602
  51. package/components/filter-bar/index.umd.cjs +1 -1
  52. package/components/flow-canvas/index.css +1 -1
  53. package/components/flow-canvas/index.esm.js +684 -675
  54. package/components/flow-canvas/index.umd.cjs +1 -1
  55. package/components/image-cropper/index.esm.js +453 -461
  56. package/components/image-cropper/index.umd.cjs +1 -1
  57. package/components/input-group/index.esm.js +604 -507
  58. package/components/input-group/index.umd.cjs +1 -1
  59. package/components/layout/index.esm.js +402 -378
  60. package/components/layout/index.umd.cjs +1 -1
  61. package/components/list-nav/index.esm.js +348 -1019
  62. package/components/list-nav/index.umd.cjs +1 -1
  63. package/components/list-view/index.esm.js +1658 -1666
  64. package/components/list-view/index.umd.cjs +1 -1
  65. package/components/lookup/index.esm.js +5209 -5088
  66. package/components/lookup/index.umd.cjs +1 -1
  67. package/components/mapping-editor/index.esm.js +4329 -4213
  68. package/components/mapping-editor/index.umd.cjs +1 -1
  69. package/components/nav/index.esm.js +905 -1357
  70. package/components/nav/index.umd.cjs +3 -3
  71. package/components/number-range/index.esm.js +517 -420
  72. package/components/number-range/index.umd.cjs +1 -1
  73. package/components/number-spinner/index.esm.js +588 -491
  74. package/components/number-spinner/index.umd.cjs +1 -1
  75. package/components/order/index.esm.js +1376 -1965
  76. package/components/order/index.umd.cjs +1 -1
  77. package/components/page-footer/index.esm.js +1 -1
  78. package/components/page-footer/index.umd.cjs +1 -1
  79. package/components/page-header/index.esm.js +1073 -1905
  80. package/components/page-header/index.umd.cjs +1 -1
  81. package/components/pagination/index.esm.js +809 -1237
  82. package/components/pagination/index.umd.cjs +1 -1
  83. package/components/progress/index.esm.js +198 -206
  84. package/components/progress/index.umd.cjs +3 -3
  85. package/components/property-editor/index.esm.js +1297 -1200
  86. package/components/property-editor/index.umd.cjs +2 -2
  87. package/components/property-panel/index.esm.js +609 -507
  88. package/components/property-panel/index.umd.cjs +1 -1
  89. package/components/query-solution/index.esm.js +3391 -3758
  90. package/components/query-solution/index.umd.cjs +1 -1
  91. package/components/radio-button/index.esm.js +1 -1
  92. package/components/radio-button/index.umd.cjs +1 -1
  93. package/components/radio-group/index.esm.js +544 -447
  94. package/components/radio-group/index.umd.cjs +1 -1
  95. package/components/rate/index.esm.js +247 -255
  96. package/components/rate/index.umd.cjs +1 -1
  97. package/components/response-layout/index.esm.js +146 -154
  98. package/components/response-layout/index.umd.cjs +1 -1
  99. package/components/response-layout-editor/index.esm.js +700 -675
  100. package/components/response-layout-editor/index.umd.cjs +1 -1
  101. package/components/response-toolbar/index.esm.js +956 -1786
  102. package/components/response-toolbar/index.umd.cjs +1 -1
  103. package/components/schema-selector/index.esm.js +4963 -5617
  104. package/components/schema-selector/index.umd.cjs +2 -2
  105. package/components/search-box/index.esm.js +158 -161
  106. package/components/search-box/index.umd.cjs +1 -1
  107. package/components/section/index.esm.js +436 -1124
  108. package/components/section/index.umd.cjs +1 -1
  109. package/components/smoke-detector/index.esm.js +92 -100
  110. package/components/smoke-detector/index.umd.cjs +1 -1
  111. package/components/splitter/index.esm.js +571 -1210
  112. package/components/splitter/index.umd.cjs +1 -1
  113. package/components/splitter/style.js +2 -0
  114. package/components/step/index.esm.js +239 -247
  115. package/components/step/index.umd.cjs +1 -1
  116. package/components/switch/index.esm.js +445 -348
  117. package/components/switch/index.umd.cjs +1 -1
  118. package/components/tabs/index.esm.js +2278 -3031
  119. package/components/tabs/index.umd.cjs +1 -1
  120. package/components/tags/index.esm.js +311 -319
  121. package/components/tags/index.umd.cjs +1 -1
  122. package/components/text/index.esm.js +215 -223
  123. package/components/text/index.umd.cjs +1 -1
  124. package/components/textarea/index.esm.js +468 -371
  125. package/components/textarea/index.umd.cjs +1 -1
  126. package/components/time-picker/index.esm.js +1271 -1174
  127. package/components/time-picker/index.umd.cjs +1 -1
  128. package/components/transfer/index.esm.js +469 -477
  129. package/components/transfer/index.umd.cjs +1 -1
  130. package/components/tree-grid/index.esm.js +3060 -3065
  131. package/components/tree-grid/index.umd.cjs +1 -1
  132. package/components/tree-view/index.esm.js +2476 -2481
  133. package/components/tree-view/index.umd.cjs +1 -1
  134. package/components/uploader/index.esm.js +374 -382
  135. package/components/uploader/index.umd.cjs +2 -2
  136. package/components/verify-detail/index.esm.js +248 -256
  137. package/components/verify-detail/index.umd.cjs +1 -1
  138. package/components/video/index.esm.js +414 -1093
  139. package/components/video/index.umd.cjs +1 -1
  140. package/components/weather/index.esm.js +498 -506
  141. package/components/weather/index.umd.cjs +5 -5
  142. package/farris.all.esm.js +20216 -21844
  143. package/farris.all.umd.cjs +9 -9
  144. package/index.css +1 -1
  145. package/package.json +1 -1
  146. package/types/common/directive/area-response.d.ts +10 -0
  147. package/types/common/index.d.ts +8 -0
  148. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  149. package/types/common/utils/resolve-field.d.ts +2 -0
  150. package/types/common/utils/use-class.d.ts +7 -0
  151. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  152. package/types/condition/src/types.d.ts +2 -1
  153. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  154. package/types/data-grid/index.d.ts +8 -5
  155. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  156. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  157. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  158. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  159. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  160. package/types/data-view/composition/types.d.ts +7 -9
  161. package/types/designer-canvas/index.d.ts +2 -1
  162. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  163. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  164. package/types/designer-canvas/src/composition/types.d.ts +1 -2
  165. package/types/designer-canvas/src/types.d.ts +2 -1
  166. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  167. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  168. package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
  169. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  170. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  171. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  172. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  173. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  174. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  175. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  176. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  177. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  178. package/types/property-panel/index.d.ts +2 -1
  179. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  180. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  182. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  183. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  184. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  185. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  186. package/types/query-solution/src/solutions.d.ts +108 -509
  187. package/types/response-layout-editor/index.d.ts +3 -1
  188. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  189. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  190. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  191. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  192. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  193. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  194. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  195. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  196. package/types/tree-grid/index.d.ts +3 -3
  197. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  198. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  199. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  200. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  201. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
@@ -1,31 +1,31 @@
1
- import { ref as v, onMounted as Y, defineComponent as W, createVNode as y, withDirectives as A, vShow as z, Teleport as U, Fragment as J, inject as P } from "vue";
2
- import { isPlainObject as X, cloneDeep as K } from "lodash-es";
3
- const Z = {}, x = {};
4
- function C(e) {
5
- const { properties: t, title: l, ignore: o } = e, i = o && Array.isArray(o), f = Object.keys(t).reduce((m, a) => ((!i || !o.find((B) => B == a)) && (m[a] = t[a].type === "object" && t[a].properties ? C(t[a]) : K(t[a].default)), m), {});
6
- return (!i || !o.find((m) => m == "id")) && (f.id = `${l}-${Date.now()}`), f;
1
+ import { ref as h, onMounted as X, defineComponent as F, createVNode as y, withDirectives as L, vShow as N, Teleport as U, Fragment as Y, inject as x } from "vue";
2
+ import { isPlainObject as q, cloneDeep as P } from "lodash-es";
3
+ const _ = {}, Z = {};
4
+ function A(e) {
5
+ const { properties: t, title: a, ignore: o } = e, i = o && Array.isArray(o), p = Object.keys(t).reduce((m, c) => ((!i || !o.find((D) => D == c)) && (m[c] = t[c].type === "object" && t[c].properties ? A(t[c]) : P(t[c].default)), m), {});
6
+ return a && (!i || !o.find((m) => m == "id")) && (p.id = `${a}-${Date.now()}`), p;
7
7
  }
8
- function M(e, t = {}, l) {
9
- const o = Z[e];
8
+ function G(e, t = {}, a) {
9
+ const o = _[e];
10
10
  if (o) {
11
- let i = C(o);
12
- const f = x[e];
13
- return i = f ? f({ getSchemaByType: M }, i, t, l) : i, i;
11
+ let i = A(o);
12
+ const p = Z[e];
13
+ return i = p ? p({ getSchemaByType: G }, i, t, a) : i, i;
14
14
  }
15
15
  return null;
16
16
  }
17
- function I(e, t) {
18
- const l = C(t);
19
- return Object.keys(e).reduce((o, i) => (o[i] && X(o[i]) && X(e[i]) ? Object.assign(o[i], e[i]) : o[i] = e[i], o), l), l;
17
+ function K(e, t) {
18
+ const a = A(t);
19
+ return Object.keys(e).reduce((o, i) => (o[i] && q(o[i]) && q(e[i]) ? Object.assign(o[i], e[i]) : o[i] = e[i], o), a), a;
20
20
  }
21
- function ee(e, t) {
21
+ function I(e, t) {
22
22
  return Object.keys(e).filter((o) => e[o] != null).reduce((o, i) => {
23
23
  if (t.has(i)) {
24
- const f = t.get(i);
25
- if (typeof f == "string")
26
- o[f] = e[i];
24
+ const p = t.get(i);
25
+ if (typeof p == "string")
26
+ o[p] = e[i];
27
27
  else {
28
- const m = f(i, e[i], e);
28
+ const m = p(i, e[i], e);
29
29
  Object.assign(o, m);
30
30
  }
31
31
  } else
@@ -33,81 +33,81 @@ function ee(e, t) {
33
33
  return o;
34
34
  }, {});
35
35
  }
36
- function te(e, t, l = /* @__PURE__ */ new Map()) {
37
- const o = I(e, t);
38
- return ee(o, l);
36
+ function ee(e, t, a = /* @__PURE__ */ new Map()) {
37
+ const o = K(e, t);
38
+ return I(o, a);
39
39
  }
40
- function ne(e = {}) {
41
- function t(r, c, s, d) {
40
+ function te(e = {}) {
41
+ function t(r, u, s, f) {
42
42
  if (typeof s == "number")
43
- return d[r].length === s;
43
+ return f[r].length === s;
44
44
  if (typeof s == "object") {
45
45
  const b = Object.keys(s)[0], g = s[b];
46
46
  if (b === "not")
47
- return Number(d[r].length) !== Number(g);
47
+ return Number(f[r].length) !== Number(g);
48
48
  if (b === "moreThan")
49
- return Number(d[r].length) >= Number(g);
49
+ return Number(f[r].length) >= Number(g);
50
50
  if (b === "lessThan")
51
- return Number(d[r].length) <= Number(g);
51
+ return Number(f[r].length) <= Number(g);
52
52
  }
53
53
  return !1;
54
54
  }
55
- function l(r, c, s, d) {
56
- return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(s);
55
+ function a(r, u, s, f) {
56
+ return f[r] && f[r].propertyValue && String(f[r].propertyValue.value) === String(s);
57
57
  }
58
58
  const o = /* @__PURE__ */ new Map([
59
59
  ["length", t],
60
- ["getProperty", l]
60
+ ["getProperty", a]
61
61
  ]);
62
- Object.keys(e).reduce((r, c) => (r.set(c, e[c]), r), o);
63
- function i(r, c) {
62
+ Object.keys(e).reduce((r, u) => (r.set(u, e[u]), r), o);
63
+ function i(r, u) {
64
64
  const s = r;
65
- return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: r, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
66
- if (d === "length")
67
- return { target: s, operator: "length", param: null, value: c[d] };
68
- const b = d, g = c[d];
65
+ return typeof u == "number" ? [{ target: s, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: s, operator: "getProperty", param: r, value: !!u }] : typeof u == "object" ? Object.keys(u).map((f) => {
66
+ if (f === "length")
67
+ return { target: s, operator: "length", param: null, value: u[f] };
68
+ const b = f, g = u[f];
69
69
  return { target: s, operator: "getProperty", param: b, value: g };
70
70
  }) : [];
71
71
  }
72
- function f(r) {
73
- return Object.keys(r).reduce((s, d) => {
74
- const b = i(d, r[d]);
72
+ function p(r) {
73
+ return Object.keys(r).reduce((s, f) => {
74
+ const b = i(f, r[f]);
75
75
  return s.push(...b), s;
76
76
  }, []);
77
77
  }
78
- function m(r, c) {
78
+ function m(r, u) {
79
79
  if (o.has(r.operator)) {
80
80
  const s = o.get(r.operator);
81
- return s && s(r.target, r.param, r.value, c) || !1;
81
+ return s && s(r.target, r.param, r.value, u) || !1;
82
82
  }
83
83
  return !1;
84
84
  }
85
- function a(r, c) {
86
- return f(r).reduce((b, g) => b && m(g, c), !0);
85
+ function c(r, u) {
86
+ return p(r).reduce((b, g) => b && m(g, u), !0);
87
87
  }
88
- function B(r, c) {
89
- const s = Object.keys(r), d = s.includes("allOf"), b = s.includes("anyOf"), g = d || b, u = (g ? r[g ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((k) => a(k, c));
90
- return d ? !u.includes(!1) : u.includes(!0);
88
+ function D(r, u) {
89
+ const s = Object.keys(r), f = s.includes("allOf"), b = s.includes("anyOf"), g = f || b, d = (g ? r[g ? f ? "allOf" : "anyOf" : "allOf"] : [r]).map((B) => c(B, u));
90
+ return f ? !d.includes(!1) : d.includes(!0);
91
91
  }
92
- return { parseValueSchema: B };
92
+ return { parseValueSchema: D };
93
93
  }
94
- const oe = {}, ie = {};
95
- ne();
96
- function re(e, t, l = /* @__PURE__ */ new Map(), o = (m, a, B) => a, i = {}, f = (m) => m) {
97
- return Z[t.title] = t, x[t.title] = o, oe[t.title] = i, ie[t.title] = f, (m = {}) => {
98
- const a = te(m, t, l), B = Object.keys(e).reduce((r, c) => (r[c] = e[c].default, r), {});
99
- return Object.assign(B, a);
94
+ const ne = {}, oe = {};
95
+ te();
96
+ function ie(e, t, a = /* @__PURE__ */ new Map(), o = (m, c, D) => c, i = {}, p = (m) => m) {
97
+ return _[t.title] = t, Z[t.title] = o, ne[t.title] = i, oe[t.title] = p, (m = {}) => {
98
+ const c = ee(m, t, a), D = Object.keys(e).reduce((r, u) => (r[u] = e[u].default, r), {});
99
+ return Object.assign(D, c);
100
100
  };
101
101
  }
102
- function se(e, t) {
102
+ function re(e, t) {
103
103
  return { customClass: t.class, customStyle: t.style };
104
104
  }
105
- function ae(e, t, l) {
105
+ function se(e, t, a) {
106
106
  return t;
107
107
  }
108
108
  const le = /* @__PURE__ */ new Map([
109
- ["appearance", se]
110
- ]), ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/dropdown.schema.json", de = "dropdown", fe = "A Farris Component", pe = "object", me = {
109
+ ["appearance", re]
110
+ ]), ae = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/dropdown.schema.json", ue = "dropdown", de = "A Farris Component", fe = "object", pe = {
111
111
  id: {
112
112
  description: "The unique identifier for dropdown",
113
113
  type: "string"
@@ -169,18 +169,18 @@ const le = /* @__PURE__ */ new Map([
169
169
  type: "boolean",
170
170
  default: !0
171
171
  }
172
- }, ye = [
172
+ }, me = [
173
173
  "id",
174
174
  "type"
175
- ], ge = {
176
- $schema: ce,
177
- $id: ue,
178
- title: de,
179
- description: fe,
180
- type: pe,
181
- properties: me,
182
- required: ye
183
- }, be = "dropdown", we = "A Farris Component", he = "object", ve = {
175
+ ], ye = {
176
+ $schema: ae,
177
+ $id: ce,
178
+ title: ue,
179
+ description: de,
180
+ type: fe,
181
+ properties: pe,
182
+ required: me
183
+ }, ge = "dropdown", be = "A Farris Component", we = "object", he = {
184
184
  basic: {
185
185
  description: "Basic Infomation",
186
186
  title: "基本信息",
@@ -233,12 +233,12 @@ const le = /* @__PURE__ */ new Map([
233
233
  }
234
234
  }
235
235
  }
236
- }, Se = {
237
- title: be,
238
- description: we,
239
- type: he,
240
- categories: ve
241
- }, V = {
236
+ }, ve = {
237
+ title: ge,
238
+ description: be,
239
+ type: we,
240
+ categories: he
241
+ }, W = {
242
242
  /** 默认展开或折叠 */
243
243
  show: { type: Boolean, default: !1 },
244
244
  /** 下拉按钮是否禁用 */
@@ -268,14 +268,14 @@ const le = /* @__PURE__ */ new Map([
268
268
  },
269
269
  onSelect: { type: Function, default: () => {
270
270
  } }
271
- }, _ = re(V, ge, le, ae, Se);
272
- function G(e, t) {
273
- let l;
274
- const o = v(e.show), i = v(), f = v(), m = v(), a = 10;
275
- Y(() => {
276
- l = f.value;
271
+ }, C = ie(W, ye, le, se, ve);
272
+ function J(e, t) {
273
+ let a;
274
+ const o = h(e.show), i = h(), p = h(), m = h(), c = 10;
275
+ X(() => {
276
+ a = p.value;
277
277
  });
278
- const B = (u = 1) => {
278
+ const D = (d = 1) => {
279
279
  const n = [
280
280
  "body>.f-datagrid-settings-simple-host",
281
281
  "body>div",
@@ -286,71 +286,71 @@ function G(e, t) {
286
286
  "body>.popover.show",
287
287
  "body>filter-row-panel>.f-datagrid-filter-panel",
288
288
  "body>.f-section-maximize"
289
- ], k = Array.from(document.body.querySelectorAll(n.join(","))).filter((w) => w).map((w) => {
290
- const { display: p, zIndex: h } = window.getComputedStyle(w);
291
- return p === "none" ? 0 : parseInt(h, 10);
292
- }).filter((w) => w);
293
- let S = Math.max(...k);
294
- return S < 1040 && (S = 1040), S + u;
295
- }, r = (u, n) => {
289
+ ], B = Array.from(document.body.querySelectorAll(n.join(","))).filter((l) => l).map((l) => {
290
+ const { display: S, zIndex: v } = window.getComputedStyle(l);
291
+ return S === "none" ? 0 : parseInt(v, 10);
292
+ }).filter((l) => l);
293
+ let w = Math.max(...B);
294
+ return w < 1040 && (w = 1040), w + d;
295
+ }, r = (d, n) => {
296
296
  const {
297
- height: k,
298
- left: S,
299
- top: w,
300
- width: p
301
- } = u.getBoundingClientRect(), { width: h, height: D, top: $ } = n.getBoundingClientRect();
302
- if (u.className.indexOf("dropdown-submenu") > -1 || u.closest(".dropdown-submenu") || u.classList.contains("dropright")) {
303
- const E = window.innerWidth - S - u.offsetWidth, N = window.innerHeight - w, { position: j } = getComputedStyle(n);
304
- if (j === "fixed") {
305
- let H = S + u.offsetWidth;
306
- n.offsetWidth > E && S > E && (H = S - h), n.style.left = H + "px", n.style.right = "auto", window.innerHeight - 2 * a < n.offsetHeight ? (n.style.top = a + "px", n.style.bottom = a + "px", n.style.maxHeight = window.innerHeight - 2 * a + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : N < n.offsetHeight ? (n.style.top = "auto", n.style.bottom = a + "px") : (n.style.top = w + "px", n.style.bottom = "auto");
297
+ height: B,
298
+ left: w,
299
+ top: l,
300
+ width: S
301
+ } = d.getBoundingClientRect(), { width: v, height: E, top: M } = n.getBoundingClientRect();
302
+ if (d.className.indexOf("dropdown-submenu") > -1 || d.closest(".dropdown-submenu") || d.classList.contains("dropright")) {
303
+ const O = window.innerWidth - w - d.offsetWidth, j = window.innerHeight - l, { position: R } = getComputedStyle(n);
304
+ if (R === "fixed") {
305
+ let T = w + d.offsetWidth;
306
+ n.offsetWidth > O && w > O && (T = w - v), n.style.left = T + "px", n.style.right = "auto", window.innerHeight - 2 * c < n.offsetHeight ? (n.style.top = c + "px", n.style.bottom = c + "px", n.style.maxHeight = window.innerHeight - 2 * c + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : j < n.offsetHeight ? (n.style.top = "auto", n.style.bottom = c + "px") : (n.style.top = l + "px", n.style.bottom = "auto");
307
307
  } else {
308
- if (n.offsetWidth > E) {
309
- const H = -h;
310
- n.style.left = H + "px";
308
+ if (n.offsetWidth > O) {
309
+ const T = -v;
310
+ n.style.left = T + "px";
311
311
  }
312
- window.innerHeight - 2 * a < n.offsetHeight ? (n.style.top = -1 * (w - a) + "px", n.style.bottom = "auto", n.style.maxHeight = window.innerHeight - 2 * a + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : N < n.offsetHeight && (n.style.top = N - n.offsetHeight - a + "px", n.style.bottom = "auto");
312
+ window.innerHeight - 2 * c < n.offsetHeight ? (n.style.top = -1 * (l - c) + "px", n.style.bottom = "auto", n.style.maxHeight = window.innerHeight - 2 * c + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : j < n.offsetHeight && (n.style.top = j - n.offsetHeight - c + "px", n.style.bottom = "auto");
313
313
  }
314
314
  } else {
315
- const { marginTop: E, marginBottom: N } = getComputedStyle(n);
316
- let j = 0;
317
- const H = Math.ceil(parseFloat(E)) + Math.ceil(parseFloat(N));
318
- let R = w + k, q = S;
319
- window.innerHeight - R - H < D && (R = w - D, R < 0 && (window.innerHeight - w - k > w ? (R = w + k, j = window.innerHeight - R - H - a) : (R = a, j = w - R - H))), window.innerWidth - S < h && window.innerWidth - S < S + p && (q = S - h + p), document.body.append(n), n.style.cssText = `position:fixed;bottom:unset;left:${q}px
320
- !important;top:${R}px !important;right: unset;${j ? "max-height:" + j + "px;overflow-y:auto;" : ""}`, j && (n.className += " dropdown-menu-maxheight"), n.style.zIndex = B().toString();
315
+ const { marginTop: O, marginBottom: j } = getComputedStyle(n);
316
+ let R = 0;
317
+ const T = Math.ceil(parseFloat(O)) + Math.ceil(parseFloat(j));
318
+ let $ = l + B, V = w;
319
+ window.innerHeight - $ - T < E && ($ = l - E, $ < 0 && (window.innerHeight - l - B > l ? ($ = l + B, R = window.innerHeight - $ - T - c) : ($ = c, R = l - $ - T))), window.innerWidth - w < v && window.innerWidth - w < w + S && (V = w - v + S), document.body.append(n), n.style.cssText = `position:fixed;bottom:unset;left:${V}px
320
+ !important;top:${$}px !important;right: unset;${R ? "max-height:" + R + "px;overflow-y:auto;" : ""}`, R && (n.className += " dropdown-menu-maxheight"), n.style.zIndex = D().toString();
321
321
  }
322
- }, c = () => {
323
- r(i.value, f.value);
322
+ }, u = () => {
323
+ r(i.value, p.value);
324
324
  }, s = () => {
325
- e.hover || (o.value = !1, document.removeEventListener("click", s), l.removeEventListener("click", s), document.removeEventListener("scroll", s), l.removeEventListener("scroll", s));
325
+ e.hover || (o.value = !1, document.removeEventListener("click", s), a.removeEventListener("click", s), document.removeEventListener("scroll", s), a.removeEventListener("scroll", s));
326
326
  };
327
327
  return {
328
328
  show: o,
329
329
  dropdownRef: i,
330
- dropdownMenuRef: f,
330
+ dropdownMenuRef: p,
331
331
  clickEventRef: m,
332
- showDropMenu: (u) => {
333
- e.hover || e.disabled || (u == null || u.stopPropagation(), o.value || setTimeout(() => {
334
- c();
335
- }), o.value = !o.value, document.addEventListener("click", s), document.addEventListener("scroll", s), e.hideOnClick || (l.addEventListener("click", (n) => {
332
+ showDropMenu: (d) => {
333
+ e.hover || e.disabled || (d == null || d.stopPropagation(), o.value || setTimeout(() => {
334
+ u();
335
+ }), o.value = !o.value, document.addEventListener("click", s), document.addEventListener("scroll", s), e.hideOnClick || (a.addEventListener("click", (n) => {
336
336
  n.stopPropagation();
337
- }), l.addEventListener("scroll", (n) => {
337
+ }), a.addEventListener("scroll", (n) => {
338
338
  n.stopPropagation();
339
339
  })));
340
340
  },
341
- hoverDropdown: (u) => {
341
+ hoverDropdown: (d) => {
342
342
  e.hover && (o.value || setTimeout(() => {
343
343
  }), o.value = !o.value);
344
344
  },
345
345
  leftButtonClick: () => {
346
346
  },
347
347
  closeDropMenu: s,
348
- selectItem: (u) => {
349
- t.emit("select", u);
348
+ selectItem: (d) => {
349
+ t.emit("select", d);
350
350
  },
351
- resolveSize: (u) => {
351
+ resolveSize: (d) => {
352
352
  const n = /px|em|rem|pt|%/;
353
- return n.test(u) ? `${parseInt(u, 10)}${u.match(n)[0]}` : `${u}px`;
353
+ return n.test(d) ? `${parseInt(d, 10)}${d.match(n)[0]}` : `${d}px`;
354
354
  }
355
355
  };
356
356
  }
@@ -365,44 +365,44 @@ const De = {
365
365
  divide: { type: Boolean, default: !1 },
366
366
  onSelect: { type: Function, default: () => {
367
367
  } }
368
- }, Q = /* @__PURE__ */ W({
368
+ }, Q = /* @__PURE__ */ F({
369
369
  name: "FDropdownItem",
370
370
  props: De,
371
371
  emits: ["select"],
372
372
  setup(e, t) {
373
- const l = v(e.value), o = v(e.label), i = v(e.disabled), f = v(e.active), m = v(e.divide), a = () => {
373
+ const a = h(e.value), o = h(e.label), i = h(e.disabled), p = h(e.active), m = h(e.divide), c = () => {
374
374
  i.value || t.emit("select", e);
375
375
  };
376
- return () => y("div", null, [A(y("div", {
376
+ return () => y("div", null, [L(y("div", {
377
377
  class: "dropdown-divider"
378
- }, null), [[z, m.value]]), y("li", {
379
- class: `dropdown-item${f.value ? " active" : ""} ${i.value ? " disabled" : ""}`,
380
- onClick: a,
381
- title: l.value.toString()
378
+ }, null), [[N, m.value]]), y("li", {
379
+ class: `dropdown-item${p.value ? " active" : ""} ${i.value ? " disabled" : ""}`,
380
+ onClick: c,
381
+ title: a.value.toString()
382
382
  }, [o.value])]);
383
383
  }
384
- }), F = /* @__PURE__ */ W({
384
+ }), z = /* @__PURE__ */ F({
385
385
  name: "FDropdown",
386
- props: V,
386
+ props: W,
387
387
  emits: ["select"],
388
388
  setup(e, t) {
389
- const l = v(e.model), {
389
+ const a = h(e.model), {
390
390
  show: o,
391
391
  dropdownMenuRef: i,
392
- dropdownRef: f,
392
+ dropdownRef: p,
393
393
  clickEventRef: m,
394
- showDropMenu: a,
395
- hoverDropdown: B,
394
+ showDropMenu: c,
395
+ hoverDropdown: D,
396
396
  leftButtonClick: r,
397
- closeDropMenu: c,
397
+ closeDropMenu: u,
398
398
  selectItem: s,
399
- resolveSize: d
400
- } = G(e, t);
399
+ resolveSize: f
400
+ } = J(e, t);
401
401
  function b(g) {
402
402
  t.emit("select", g);
403
403
  }
404
404
  return () => y("div", {
405
- ref: f
405
+ ref: p
406
406
  }, [y("div", {
407
407
  class: ["farris-dropdown", "btn-group", {
408
408
  dropup: e.position === "top"
@@ -463,137 +463,129 @@ const De = {
463
463
  disabled: e.disabled
464
464
  }],
465
465
  style: "width:100%",
466
- onClick: a,
467
- onMouseenter: B,
468
- onMouseleave: B
469
- }, [A(y("span", {
466
+ onClick: c,
467
+ onMouseenter: D,
468
+ onMouseleave: D
469
+ }, [L(y("span", {
470
470
  class: "sr-only"
471
- }, null), [[z, e.splitButton]]), e.splitButton ? "" : e.title, A(y("span", {
471
+ }, null), [[N, e.splitButton]]), e.splitButton ? "" : e.title, L(y("span", {
472
472
  class: `f-icon ${e.iconClass.toString()}`
473
- }, null), [[z, e.iconClass]])]), y(U, {
473
+ }, null), [[N, e.iconClass]])]), y(U, {
474
474
  to: "body"
475
475
  }, {
476
476
  default: () => [y("div", {
477
477
  ref: i,
478
478
  class: `dropdown-menu${o.value ? " show" : ""}`
479
- }, [y(J, null, [l.value.map(({
479
+ }, [y(Y, null, [a.value.map(({
480
480
  label: g,
481
- value: T,
482
- disabled: O,
483
- active: u,
481
+ value: k,
482
+ disabled: H,
483
+ active: d,
484
484
  divide: n
485
485
  }) => y(Q, {
486
- value: T.toString(),
486
+ value: k.toString(),
487
487
  label: g,
488
- disabled: O,
489
- active: u,
488
+ disabled: H,
489
+ active: d,
490
490
  divide: n,
491
- onSelect: (k) => b(k)
491
+ onSelect: (B) => b(B)
492
492
  }, null))])])]
493
493
  })])]);
494
494
  }
495
495
  });
496
- function Be(e, t, l) {
496
+ function Se(e, t, a) {
497
497
  var w;
498
498
  function o() {
499
499
  }
500
- const i = "", f = "", m = v();
501
- function a() {
500
+ const i = "", p = "", m = h();
501
+ function c() {
502
502
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
503
503
  }
504
- function B() {
504
+ function D() {
505
505
  return !1;
506
506
  }
507
507
  function r() {
508
508
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
509
509
  }
510
- function c() {
510
+ function u() {
511
511
  return (t == null ? void 0 : t.schema.componentType) === "frame";
512
512
  }
513
- function s(p) {
514
- if (!p || !p.value)
513
+ function s(l) {
514
+ if (!l || !l.value)
515
515
  return null;
516
- if (p.value.schema && p.value.schema.type === "component")
517
- return p.value;
518
- const h = v(p == null ? void 0 : p.value.parent), D = s(h);
519
- return D || null;
516
+ if (l.value.schema && l.value.schema.type === "component")
517
+ return l.value;
518
+ const S = h(l == null ? void 0 : l.value.parent), v = s(S);
519
+ return v || null;
520
520
  }
521
- function d(p = t) {
522
- const { componentInstance: h, designerItemElementRef: D } = p;
523
- return !h || !h.value ? null : h.value.canMove ? D : d(p.parent);
521
+ function f(l = t) {
522
+ const { componentInstance: S, designerItemElementRef: v } = l;
523
+ return !S || !S.value ? null : S.value.canMove ? v : f(l.parent);
524
524
  }
525
- function b(p) {
526
- return !!l;
525
+ function b(l) {
526
+ return !!a;
527
527
  }
528
528
  function g() {
529
529
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
530
530
  }
531
- function T() {
532
- }
533
- function O(p, h) {
531
+ function k() {
534
532
  }
535
- function u(p, h) {
536
- const { componentType: D } = p;
537
- let $ = M(D, p, h);
538
- const L = D.toLowerCase().replace("-", "_");
539
- return $ && !$.id && $.type === D && ($.id = `${L}_${Math.random().toString().slice(2, 6)}`), $;
533
+ function H(l, S) {
540
534
  }
541
- function n(p, h) {
542
- const D = String(p.getAttribute("data-controltype")), $ = p.getAttribute("data-feature"), L = $ ? JSON.parse($) : {};
543
- L.parentComponentInstance = m.value;
544
- let E = M(D, L);
545
- const N = D.toLowerCase().replace("-", "_");
546
- return E && !E.id && E.type === D && (E.id = `${N}_${Math.random().toString().slice(2, 6)}`), E;
535
+ function d(l, S) {
536
+ const { componentType: v } = l;
537
+ let E = G(v, l, S);
538
+ const M = v.toLowerCase().replace("-", "_");
539
+ return E && !E.id && E.type === v && (E.id = `${M}_${Math.random().toString().slice(2, 6)}`), E;
547
540
  }
548
- function k(p) {
541
+ function n(l) {
549
542
  }
550
- function S(...p) {
543
+ function B(...l) {
551
544
  }
552
545
  return m.value = {
553
- canMove: a(),
554
- canSelectParent: B(),
546
+ canMove: c(),
547
+ canSelectParent: D(),
555
548
  canDelete: r(),
556
- canNested: !c(),
549
+ canNested: !u(),
557
550
  contents: t == null ? void 0 : t.schema.contents,
558
551
  elementRef: e,
559
552
  parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
560
553
  schema: t == null ? void 0 : t.schema,
561
554
  styles: i,
562
- designerClass: f,
555
+ designerClass: p,
563
556
  canAccepts: b,
564
557
  getBelongedComponentInstance: s,
565
- getDraggableDesignItemElement: d,
558
+ getDraggableDesignItemElement: f,
566
559
  getDraggingDisplayText: g,
567
- getPropConfig: S,
568
- getDragScopeElement: T,
569
- onAcceptMovedChildElement: O,
570
- onAcceptNewChildElement: n,
571
- onChildElementMovedOut: k,
572
- addNewChildComponentSchema: u,
560
+ getPropConfig: B,
561
+ getDragScopeElement: k,
562
+ onAcceptMovedChildElement: H,
563
+ onChildElementMovedOut: n,
564
+ addNewChildComponentSchema: d,
573
565
  updateDragAndDropRules: o,
574
- triggerBelongedComponentToMoveWhenMoved: v(!1),
575
- triggerBelongedComponentToDeleteWhenDeleted: v(!1)
566
+ triggerBelongedComponentToMoveWhenMoved: h(!1),
567
+ triggerBelongedComponentToDeleteWhenDeleted: h(!1)
576
568
  }, m;
577
569
  }
578
- const ke = /* @__PURE__ */ W({
570
+ const Be = /* @__PURE__ */ F({
579
571
  name: "FDropdownDesign",
580
- props: V,
572
+ props: W,
581
573
  emits: ["select"],
582
574
  setup(e, t) {
583
- const l = v(e.model), {
575
+ const a = h(e.model), {
584
576
  show: o,
585
577
  showDropMenu: i,
586
- hoverDropdown: f,
578
+ hoverDropdown: p,
587
579
  leftButtonClick: m,
588
- closeDropMenu: a,
589
- selectItem: B,
580
+ closeDropMenu: c,
581
+ selectItem: D,
590
582
  resolveSize: r
591
- } = G(e, t);
592
- function c(g) {
583
+ } = J(e, t);
584
+ function u(g) {
593
585
  t.emit("select", g);
594
586
  }
595
- const s = v(), d = P("design-item-context"), b = Be(s, d);
596
- return Y(() => {
587
+ const s = h(), f = x("design-item-context"), b = Se(s, f);
588
+ return X(() => {
597
589
  s.value.componentInstance = b;
598
590
  }), t.expose(b.value), () => y("div", {
599
591
  ref: s
@@ -660,43 +652,43 @@ const ke = /* @__PURE__ */ W({
660
652
  }],
661
653
  style: "width:100%",
662
654
  onClick: i,
663
- onMouseenter: f,
664
- onMouseleave: f
665
- }, [A(y("span", {
655
+ onMouseenter: p,
656
+ onMouseleave: p
657
+ }, [L(y("span", {
666
658
  class: "sr-only"
667
- }, null), [[z, e.splitButton]]), e.splitButton ? "" : e.title, A(y("span", {
659
+ }, null), [[N, e.splitButton]]), e.splitButton ? "" : e.title, L(y("span", {
668
660
  class: `f-icon ${e.iconClass.toString()}`
669
- }, null), [[z, e.iconClass]])]), y("div", {
661
+ }, null), [[N, e.iconClass]])]), y("div", {
670
662
  class: `dropdown-menu${o.value ? " show" : ""}`
671
- }, [y(J, null, [l.value.map(({
663
+ }, [y(Y, null, [a.value.map(({
672
664
  label: g,
673
- value: T,
674
- disabled: O,
675
- active: u,
665
+ value: k,
666
+ disabled: H,
667
+ active: d,
676
668
  divide: n
677
669
  }) => y(Q, {
678
- value: T.toString(),
670
+ value: k.toString(),
679
671
  label: g,
680
- disabled: O,
681
- active: u,
672
+ disabled: H,
673
+ active: d,
682
674
  divide: n,
683
- onSelect: (k) => c(k)
675
+ onSelect: (B) => u(B)
684
676
  }, null))])])])]);
685
677
  }
686
- }), Te = {
678
+ }), $e = {
687
679
  install(e) {
688
- e.component(F.name, F);
680
+ e.component(z.name, z);
689
681
  },
690
- register(e, t, l, o) {
691
- e.dropdown = F, t.dropdown = _;
682
+ register(e, t, a, o) {
683
+ e.dropdown = z, t.dropdown = C;
692
684
  },
693
- registerDesigner(e, t, l) {
694
- e.dropdown = ke, t.dropdown = _;
685
+ registerDesigner(e, t, a) {
686
+ e.dropdown = Be, t.dropdown = C;
695
687
  }
696
688
  };
697
689
  export {
698
- F as Dropdown,
699
- Te as default,
700
- V as dropdownProps,
701
- _ as propsResolver
690
+ z as Dropdown,
691
+ $e as default,
692
+ W as dropdownProps,
693
+ C as propsResolver
702
694
  };